Custom Dialog Box to Open A Form

ccocom

Registered User.
Local time
Today, 12:29
Joined
Nov 15, 2002
Messages
27
I have created a custom dialog box and am able to open a report displaying the selected data; however, I am unable to to the same to open a form. The parameter query works fine, but when I open the form from the custom dialog box (form) no records are present. Any ideas?
 
You need to filter the form to open to a specific record.

Behind the click event of a button on your dialogbox form, place code like this:

Dim strWhere As String

strWhere = "[RecordIDNameOnFormyouareopening]=" & "forms!yourdialogboxformname!RecordIDThatmatchestheRecordonthe otherform"


DoCmd.OpenForm "frmyourdialogboxformname", acNormal, , strwhere, acFormEdit


Should work - HTH
 

Users who are viewing this thread

Back
Top Bottom