David Dubs
David Dubs

Reputation: 39

Access Data Macro function ‘Updated’ fails with Combo Box

Running Microsoft Office 365, Windows 7 Enterprise.

When working with a test table in datasheet view, a data macro will not detect when the “Status” field changes. The data macro works properly as long as the ‘Allow Multiple Values’ attribute is set to NO. But the function “Updated” does not detect a field value change when the ‘Allow Multiple Values’ attribute is set to YES.

Tbl_TEST:After Update – data macro

If Updated(“Status”) Then
    SetLocalVar
        Name:       RecordID
        Expression: =[tbl_TEST].[RecordID]
Else
    StopMacro
End If
Look Up A Record In tbl_TEST
    Where Condition: =[tbl_Test].[RecordID]=[RecordID]
    EditRecord
        SetField
            Name:   tbl_TEST.StatusChange_TS
            Value:  =Now()
    End EditRecord

I tried the following technique, but it too does not detect a change in the “Status” field with multiple values.

If [tbl_TEST].[Status]<>[Old].[Status] Then

Any help would be appreciated.

enter image description here

Upvotes: -1

Views: 295

Answers (1)

tiedied61
tiedied61

Reputation: 46

Data Macros do not support reading of Multi-Valued fields (or attachment fields). If you were to try to log the values using a LogEvent action you will get the following error ( my field is AllPlans)

The field '[AllPlans]' could not be read because it is a multi-value or attachment field.

I suggest doing it the old-fashioned way, using a sub-table, with Multi-Part Key and multiple data rows. Then deal with the changes in that table.

Art

Upvotes: 0

Related Questions