Hey,
I am currently working on a form which requires user to enter customer ID and then display corresponding records with that customer ID, ex. customer status, amount spent etc. I did some research and realized there's a function called "DLookup" can do the work for me but just confused how to use it correctly.
I setted up an update button. After entering customer ID in a seperate text box and press the update button, the corresponding records would show up in other text boxes. And the code I used is in the following (an example for one text box):
which did not work.... could someone help me please
I am currently working on a form which requires user to enter customer ID and then display corresponding records with that customer ID, ex. customer status, amount spent etc. I did some research and realized there's a function called "DLookup" can do the work for me but just confused how to use it correctly.
I setted up an update button. After entering customer ID in a seperate text box and press the update button, the corresponding records would show up in other text boxes. And the code I used is in the following (an example for one text box):
Code:
Private Sub CmdUpdate_Click() Me.lblCustomerStat.Caption = DLookup("Customer Status", "Query.[Asset Status Query]", "Query.[Asset Status Query].ID = Me.txtCustomerID") End Sub
Comment