Reputation: 1
Shows the number to be clicked and the resulting form that opens
Simply put...I am trying to open a specific record based on the record number that is clicked in the form. From a search criteria form, clicking "Search" opens another form in database view listing the search results. On click of the record number, I need that specific record to open in the assigned form.
Note:
My form was created from a query and is set to database view - this works
The record number (VDMR Number) is set to display as a hyperlink - this works
On click of record number, the correct form opens but it is a blank record - Problem
My brain has melted several times over the past two days searching for a fix.
Here is the code I am using:
>DoCmd.OpenForm "QPF-45 (11/2012)", , , "VDMR_Number =" & Me.VDMR__
Upvotes: 0
Views: 52
Reputation: 55806
VDMR Number, the code didn't work without the underscore in between
Neither did it with the underscore, because that's not a field name of yours.
So, either change the field name to not have a space, or wrap it in brackets:
DoCmd.OpenForm "QPF-45 (11/2012)", , , "[VDMR Number] =" & Me.VDMR__
And refrain from using unreadable control names like "VDMR__"
Upvotes: 1