Hi all,
I want a user to enter a number into an input box and then based on the number in this box a form will be opened with records associated only with that employee number. (All employee numbers are stored as text)
The code below opens the form, but it is blank. How to fix it?
Private Sub cmdOpenAddKeys_Click()
Dim EmployeeNumber As String
EmployeeNumber = InputBox("Please Enter Employee Number:")
DoCmd.OpenForm "frmAddKeys", acNormal, , "[Forms]![frmAddKeys]![empno]=" & EmployeeNumber
End Sub
Thanks in advance.
I want a user to enter a number into an input box and then based on the number in this box a form will be opened with records associated only with that employee number. (All employee numbers are stored as text)
The code below opens the form, but it is blank. How to fix it?
Private Sub cmdOpenAddKeys_Click()
Dim EmployeeNumber As String
EmployeeNumber = InputBox("Please Enter Employee Number:")
DoCmd.OpenForm "frmAddKeys", acNormal, , "[Forms]![frmAddKeys]![empno]=" & EmployeeNumber
End Sub
Thanks in advance.