G
Guest
Hello,
I was wondering whether someone could please help me.
I have been working on a form which asks the user to enter a password based on the employee ID number which they enter in an input box.
I am trying to draw the correct password information from a table containing employee information but keep receiving the following error message on running:
Run-time error '2471
The expression you entered as a query parameter produced this error:
'The object doesn't contain the Automation object 'G01."
G01 was the inputed Employee ID and this is held within the EmployeeID field of the table EmployeeInfo
The code I am using as a test is shown below:
Private Sub Form_Open(Cancel As Integer)
Dim correct As String
Dim employee As String
employee = InputBox("Please enter your Employee ID", "Employee ID")
correct = DLookup("Password", "EmployeeInfo", "EmployeeID = " & employee)
Message = MsgBox("value is " & correct)
End Sub
Any help on getting this to work would be much appreciated
Many thanks
I was wondering whether someone could please help me.
I have been working on a form which asks the user to enter a password based on the employee ID number which they enter in an input box.
I am trying to draw the correct password information from a table containing employee information but keep receiving the following error message on running:
Run-time error '2471
The expression you entered as a query parameter produced this error:
'The object doesn't contain the Automation object 'G01."
G01 was the inputed Employee ID and this is held within the EmployeeID field of the table EmployeeInfo
The code I am using as a test is shown below:
Private Sub Form_Open(Cancel As Integer)
Dim correct As String
Dim employee As String
employee = InputBox("Please enter your Employee ID", "Employee ID")
correct = DLookup("Password", "EmployeeInfo", "EmployeeID = " & employee)
Message = MsgBox("value is " & correct)
End Sub
Any help on getting this to work would be much appreciated
Many thanks