I'm trying to modify a MS template that has the following code:
I want this to also pick up the ContactID value on the form but not sure exactly what this macro is doing.
Code:
OnError Next
RunCommand SaveRecord
MsgBox =[MacroError].[Description],Yes, None,
StopMacro
OnError Fail,
OpenForm Contact Calls Details, Form, , "[ID]=" & Nz([ID],0),,Dialog
SetTempVar CurrentID, [ID]
SetTempVar CurrentID,Nz(DMax("[ID]",[Form].[RecordSource]),0)
Requery
SearchForRecord Form,Contact Details, First,="[ID]=" & [TempVars]![CurrentID]
Remove TempVar CurrentID
I want this to also pick up the ContactID value on the form but not sure exactly what this macro is doing.