S
Simon Harris
Hi All,
I am using the following code to open up a form following the user double
clicking on an item in a listbox...
Private Sub ListBoxCustomers_DblClick(Cancel As Integer)
'Open selected customer for editing
stDocName = "frmAddEditCustomers"
MsgBox (Forms!frmCustomers!ListBoxCustomers) 'Diags - Returns expected
value
stLinkCriteria = "[id]=" & Forms!frmCustomers!ListBoxCustomers
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub
When the form opens, I get a dialogue box that says "Enter Paramter Value".
If I enter a known record ID, I get the expected record.
Can someone please advise what I need to change in then opening form to
accept the criteria and open the required record, without having to type it
into the "Enter Parameter Value" box?
Many Thanks!
Simon.
I am using the following code to open up a form following the user double
clicking on an item in a listbox...
Private Sub ListBoxCustomers_DblClick(Cancel As Integer)
'Open selected customer for editing
stDocName = "frmAddEditCustomers"
MsgBox (Forms!frmCustomers!ListBoxCustomers) 'Diags - Returns expected
value
stLinkCriteria = "[id]=" & Forms!frmCustomers!ListBoxCustomers
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub
When the form opens, I get a dialogue box that says "Enter Paramter Value".
If I enter a known record ID, I get the expected record.
Can someone please advise what I need to change in then opening form to
accept the criteria and open the required record, without having to type it
into the "Enter Parameter Value" box?
Many Thanks!
Simon.