I have a form that I want to use the dlookup function. I want this form to look up the AccountNumber that I type in and I want it to grab the Company Name and Account Type from the client table. The Company Name information, from the client table, is a drop down menu that draws from a query I had set up. The Account Type information, from the client table, is just a drop down list created in that table (no query).
Here is what I thought would work, but it's not. Any ideas? Does the query mess it up?
Private Sub AccountNumber_AfterUpdate()
Company = DLookup("Company Name", "Account List", "Account Number=" & AccountNumber)
AccountType = DLookup("Account Type", "Account List", "Account Number=" & AccountNumber)
End Sub