I keep getting a data type mismatch in the following code:
Me!Address = DLookup("[Address]", "TBLCustomer", "[CustomerID] = '" & Forms!FRMORDER!CustomerID & "'")
I am trying to lookup address when it matches the customer id.
This is how the customer id is coded:
SELECT DISTINCT [TBLCustomer].[CustomerID], [FirstName] & " " & [LastName] AS [Sold To] FROM TBLCustomer ORDER BY [FirstName] & " " & [LastName];
I think the type mismatch is coming from the first and last name being put in the field instead of the customerid?
Any help on how to fix this would be appreciated.
Thanks,
Nancy
Me!Address = DLookup("[Address]", "TBLCustomer", "[CustomerID] = '" & Forms!FRMORDER!CustomerID & "'")
I am trying to lookup address when it matches the customer id.
This is how the customer id is coded:
SELECT DISTINCT [TBLCustomer].[CustomerID], [FirstName] & " " & [LastName] AS [Sold To] FROM TBLCustomer ORDER BY [FirstName] & " " & [LastName];
I think the type mismatch is coming from the first and last name being put in the field instead of the customerid?
Any help on how to fix this would be appreciated.
Thanks,
Nancy