I have a form that lists records in my data table. From this form I can open another form for more details. When I select open on the current record the details form opens blank. I am not sure what it is I am over looking.
My main form is named List. I have a textbox named txtopen with a control source value of =IIf(IsNull([ID]),"(New)","Open"). I created a on click envent macro as follows.
Condition Action Arguments
[Form].[Dirty] RunCommand SaveRecord
[MacroError].[Number] MsgBox =[MacroError].[Description], Yes, None,
OpenForm Details, Form, , ="[ID]=" & Nz([ID],0), , Dialog
Not IsNull([ID]) SetTempVar CurrentID, [ID]
IsNull([ID]) SetTempVar CurrentID, Nz(DMax("[ID]",[Form].[RecordSource]),0)
SearchForRecord Form, Mediation List, First, ="[ID]=" & [TempVars]![CurrentID]
Any help or advice would be greatly appreciated.