Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open Form to see specific records

Status
Not open for further replies.

10TR

Technical User
Dec 14, 2009
12
US
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.
 
Why not using linked subforms ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top