Help with Openform with DblClick selected record

scottb
4StarLounger
Posts: 402
Joined: 14 Apr 2010, 15:59

Help with Openform with DblClick selected record

Post by scottb »

Hi everyone,
Hans, you helped me with a version of this a while back. It’s a search form that allows the user to double click and open another form (DEMOGRAPHIC) with the selected record. I copied the original that is working and tried to apply it to this instance and I cannot get the double click/open form event to work. Not sure what I missed. Any help would be appreciated. Thank you. -Scott
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Help with Openform with DblClick selected record

Post by HansV »

You have this line:

Code: Select all

        DoCmd.OpenForm "frmCaseLogSearchNew", , , "SER_NUM" & Me.QuickSearch
In the first place, you want to open the form DEMOGRAPHIC, not frmCaseLogSearchNew for that is the form from which you call the code.
In the second place, the OpenArgs argument must be of the form SER_NUM=...

So:

Code: Select all

        DoCmd.OpenForm "DEMOGRAPHIC", , , "SER_NUM=" & Me.QuickSearch
Best wishes,
Hans

scottb
4StarLounger
Posts: 402
Joined: 14 Apr 2010, 15:59

Re: Help with Openform with DblClick selected record

Post by scottb »

Thank you Hans.