Hi, I am looking for a code to open up a specific form based on listbox data after double clicking on the record.
The primary key for the listbox is "PerfID"
Thanks!
Hi, I am looking for a code to open up a specific form based on listbox data after double clicking on the record.
The primary key for the listbox is "PerfID"
Thanks!
Yes, just like that. The only thing I am not understanding is the last Me.xxxxx. What does the ControlName refer to?
The name of the control containing the value to filter on. In your case, the listbox.
Thank you! That worked...only issue now is that when I double click it is defaulting to a new form rather than the requested form.
You mean a new record? What is the code to open the form, and what is the data entry property of the form being opened?
Yes, a new record...
The code to open the form is:
DoCmd.OpenForm "frm_Master", , , "PerfID = " & Me.SearchResults
Data entry property of the form being opened is:
Yes
When I switch data entry to "no" it asks me for parameters when I double click on the record.
What parameters? Is PerfID a field in that form's record source?
I'm not understanding the question...sorry, I'm new with this stuff.
PerfID refers to the Primary Key of tbl_Main. frm_Master is the form I am trying to open up based on the PerfID field.
If you're getting a parameter prompt, Access can't find whatever the prompt is for (it should specify what it's looking for in the prompt). Either the field name is spelled wrong, or it isn't in the second form. Can you post the db here?
Here you go. I'm also trying to filter the listbox with the combo boxes on top...Once I figure out one, i'll be able to do the others. Thanks!Account Database.zip
Your field is text, so it needs the delimiters as shown on the link.
Okay, thanks! The open now works, however the Custodian ID is coming up blank. When I try to switch it manually, it populates as a number on the listbox...
[ATTACH]12437[/ATTACH
Check the bound column property of the combo.
I set it to 1 and now it works. Why did that make the difference?