I am trying to set up a form to enter a name into a textbox and have an ID number populate another textbox. I am not getting an error but the destination textbox is not populating.
Here is the details
Table: dbo_dic_Client
Name of the form: frmMain
Form Data Entry text box: txtClient
Form Destination textbox: txtClientNum
ID Field from table clid
info from table: uci
Here is the details
Table: dbo_dic_Client
Name of the form: frmMain
Form Data Entry text box: txtClient
Form Destination textbox: txtClientNum
ID Field from table clid
info from table: uci
Code:
Private Sub txtClient_Exit(Cancel As Integer)
Dim intClient As Integer
intClient = DLookup("clid", "dbo_dic_Client", "uci = " & Forms![frmMain]!txtClient)
Debug.Print intClient
frmMain!txtClientNum = intClient
End Sub