I searched this forum for autopopulating but nothing really seemed exactly like i'd like it to happen. What im trying to do is once the user is done changing the information i.e. his name... it will autopopulate the ID from the information in a table. Im currently using the onchange event of that particular item in the form.
Dim iOMDID As String
If IsNull(Me.EmployeeName) = False Then
iOMDID = DLookup("[OMD_ID]", "tblEmployeeID", "[EmployeeName] = " & Me.EmployeeName)
Me.OMD_ID = iOMDID
End If
Is what i have so far in there and when i test it it gives me an error message saying syntax error Missing Operand in "[EmployeeName] = " & Me.EmployeeName. As it is probably just me not parsing correctly any help?
Dim iOMDID As String
If IsNull(Me.EmployeeName) = False Then
iOMDID = DLookup("[OMD_ID]", "tblEmployeeID", "[EmployeeName] = " & Me.EmployeeName)
Me.OMD_ID = iOMDID
End If
Is what i have so far in there and when i test it it gives me an error message saying syntax error Missing Operand in "[EmployeeName] = " & Me.EmployeeName. As it is probably just me not parsing correctly any help?