R
Robin
Hi All,
Using Access 2007. Here's the code i have for the on_click event of a
comand button:
Private Sub OpenCustomer_Click()
On Error GoTo Err_OpenCustomer_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "ManageCustomers"
stLinkCriteria = "[AccountNumber]=" & Me![AccountNumber]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_OpenCustomer_Click:
Exit Sub
Err_OpenCustomer_Click:
MsgBox Err.Description
Resume Exit_OpenCustomer_Click
End Sub
When i click the button i get the "Enter Paramater Value" box with the
account number in question shown on the banner of the input box!!! Why is
the AccountNumber not being carried to the 'ManageCustomers' form?
It's also worth mentioning that i tried to create the event using the
command button wizard, however the field list for one of the forms was empty
when i got to the point of linking the fields (in this case AccountNumber)
together so therefore decided to create the code manually.
Thanks for any help
Rgds
Robin
Using Access 2007. Here's the code i have for the on_click event of a
comand button:
Private Sub OpenCustomer_Click()
On Error GoTo Err_OpenCustomer_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "ManageCustomers"
stLinkCriteria = "[AccountNumber]=" & Me![AccountNumber]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_OpenCustomer_Click:
Exit Sub
Err_OpenCustomer_Click:
MsgBox Err.Description
Resume Exit_OpenCustomer_Click
End Sub
When i click the button i get the "Enter Paramater Value" box with the
account number in question shown on the banner of the input box!!! Why is
the AccountNumber not being carried to the 'ManageCustomers' form?
It's also worth mentioning that i tried to create the event using the
command button wizard, however the field list for one of the forms was empty
when i got to the point of linking the fields (in this case AccountNumber)
together so therefore decided to create the code manually.
Thanks for any help
Rgds
Robin