Hello,
I have a form that has a list of Employee numbers and when you double click on an employee's number it opens another form that list all the accounts under that employee number.
Everything is working fine except there're a couple of duplicate employee numbers for the US and Canada so when you click on one of these numbers it returns both accounts for the employee number in the US and Canada.
This is the code I have right now to open the second account list form. The field that distinguishes US from Canada is called "Control Area", what do I need to add to this code so that it checks both the employee number and the "control area"?
Private Sub test_button_Click()
On Error GoTo Err_test_button_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Potential Loss Acct Detail Form"
stLinkCriteria = "[Credit_Rep]=" & Me![Credit Rep]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_test_button_Click:
Exit Sub
Thank you
I have a form that has a list of Employee numbers and when you double click on an employee's number it opens another form that list all the accounts under that employee number.
Everything is working fine except there're a couple of duplicate employee numbers for the US and Canada so when you click on one of these numbers it returns both accounts for the employee number in the US and Canada.
This is the code I have right now to open the second account list form. The field that distinguishes US from Canada is called "Control Area", what do I need to add to this code so that it checks both the employee number and the "control area"?
Private Sub test_button_Click()
On Error GoTo Err_test_button_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Potential Loss Acct Detail Form"
stLinkCriteria = "[Credit_Rep]=" & Me![Credit Rep]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_test_button_Click:
Exit Sub
Thank you