Hello all
I have been trying to run a macro that will update a date.
The premise is that I have a Form for the table [ACTIONS] and within these actions, there are different notes --> [ACTIONNOTES]
An action will have multiple notes.
On [ACTIONS] there is [LastUpdate] date and on [ACTIONNOTES] each note will hace a [NoteDate]. Now the goal is to populate [LastUpdate] with the latest [NoteDate].
I have built a macro as follows to be used in the [ACTIONS] form:
SetValue
Item=[LastUpdate]
Expression=DLookUp("[NoteDate]","ACTIONNOTES","[ActionID]=[ActionIDb]")
The problem with this is that it gives me a random date and not necessarily the date from the latest note.
Also I am not sure if there is a way to have the Macro run in the [ACTIONNOTES] form so that I don't have to go back to the [ACTIONS] form to somehow activate this macro
Any help is greatly appreciated!
I have been trying to run a macro that will update a date.
The premise is that I have a Form for the table [ACTIONS] and within these actions, there are different notes --> [ACTIONNOTES]
An action will have multiple notes.
On [ACTIONS] there is [LastUpdate] date and on [ACTIONNOTES] each note will hace a [NoteDate]. Now the goal is to populate [LastUpdate] with the latest [NoteDate].
I have built a macro as follows to be used in the [ACTIONS] form:
SetValue
Item=[LastUpdate]
Expression=DLookUp("[NoteDate]","ACTIONNOTES","[ActionID]=[ActionIDb]")
The problem with this is that it gives me a random date and not necessarily the date from the latest note.
Also I am not sure if there is a way to have the Macro run in the [ACTIONNOTES] form so that I don't have to go back to the [ACTIONS] form to somehow activate this macro
Any help is greatly appreciated!