I am using seven forms to enter information about a venue.The active form contains the primary key record that is also carried to the related second. example: (frm-room.roomId (primary) to related frm-presenter.roomId.) I have been using this code to open forms, set values, and close forms.
Private Sub Open_Banquets_Button_Click()
Me.Refresh
DoCmd.OpenForm "frm-banquets", acNormal, , "audienceId=" & Me.audienceId
DoEvents
Forms![frm-banquets]!audienceId.DefaultValue = Me!audienceId
DoCmd.Close acForm, "frm-audience", acSaveYes
End Sub
I need another button on the Audeince From that would allow me to reopen the previous form and show the same information it did before it was close. Something like this but it's very wrong.
Me.Refresh
DoCmd.OpenForm "frm-presenter", acNormal, , "Form!frm-room.roomId=" & Me.roomId
The room form and the presenter form contain a roomId record that I need to populate on the presenter form. Thanks for your help.
Private Sub Open_Banquets_Button_Click()
Me.Refresh
DoCmd.OpenForm "frm-banquets", acNormal, , "audienceId=" & Me.audienceId
DoEvents
Forms![frm-banquets]!audienceId.DefaultValue = Me!audienceId
DoCmd.Close acForm, "frm-audience", acSaveYes
End Sub
I need another button on the Audeince From that would allow me to reopen the previous form and show the same information it did before it was close. Something like this but it's very wrong.
Me.Refresh
DoCmd.OpenForm "frm-presenter", acNormal, , "Form!frm-room.roomId=" & Me.roomId
The room form and the presenter form contain a roomId record that I need to populate on the presenter form. Thanks for your help.