I have several instances where I want to open a form in a dialaog and auto fill out a field. For example:
AddClients and AddClientContacts I have a dialog box for both AddClient and AddClientContact
When in the AddClient dialog I want to have a button to open the AddClientContact dialog and auto fill the ID field.
My code works to open, and my code works to copy the data but the code after opening doesn't work until dialogs are closed. (and in VBA editor you can see it's still running)
I have tried via Macro OpenForm then RunCode and VBA DoCmd.OpenForm but have the same problem each time.
Is this normal dialog behavior? Is there a way to make code run after an open dialog command?
Just looking for a simple way to open then populate a field. This is the VBA I have at the moment:
Private Sub btn_AddClientContacts_Click()
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenForm "frm_ADDClientContact", acNormal, , , acFormAdd, acDialog
Forms!frm_ADDClientContact!FK_CC_Client_ID = Forms!frm_ADDClients!Client_ID
End Sub
Thanks, KAL