I have two tables ClientNames and Sample. ClientNames has two fields called ClientID and FirstName that I want to reference on the Sample form I am creating.
On the Sample form I have a combo list of client IDs based on the ClientName table. When I enter an ID in the Sample form's ClientID field I want the corresponding name from the ClientNames table to automatically be inputed into a field called FirstName so on the Sample form. The only control I am using is on the field FirstName in the Properties Control Source. I am using the following:
=DLookUp("[FirstName]","ClientNames"," & [ClientID] = '" & [ClientID] & "'")
The criteria is text. When I use this all I get in the FirstName field is #Error.
Is part of the problem having both Tables using the same field names?
Anyone have any suggestions??? Is the way I'm going the best way? I am a real newbie to Access so please keep that in mind.
Thanks to anyone that can help.
Rita
On the Sample form I have a combo list of client IDs based on the ClientName table. When I enter an ID in the Sample form's ClientID field I want the corresponding name from the ClientNames table to automatically be inputed into a field called FirstName so on the Sample form. The only control I am using is on the field FirstName in the Properties Control Source. I am using the following:
=DLookUp("[FirstName]","ClientNames"," & [ClientID] = '" & [ClientID] & "'")
The criteria is text. When I use this all I get in the FirstName field is #Error.
Is part of the problem having both Tables using the same field names?
Anyone have any suggestions??? Is the way I'm going the best way? I am a real newbie to Access so please keep that in mind.
Thanks to anyone that can help.
Rita