Information in a text box

kentman

New member
Local time
Today, 17:38
Joined
Mar 24, 2009
Messages
5
I have a form that gives details of my clients and on that ia a tabbed form with various fields - I am trying to get information (concatenadted address line) from a query into it but don't know the syntax - can anyone give my the syntax to get info. into a form field from an unrelated table?
:(
Kent
 
Not sure if I understand entirely.

If you have the query already built, you can use a DLookup:

=DLookup("[AddressLine]","qryAddress","[PersonID]=" & PersonField

If you don't have the query built, and want it displayed on the form, you would enter something like:

=[FirstName] & ", " & [LastName] & ", " & [StreetAddress] & ", " & [City]... etc.

If you want it done in a query and don't have the query built, you would use something like:

AddressLine: [FirstName] & ", " & [LastName] & ", " & [StreetAddress] & ", " & [City]... etc. Assuming all those fields are added to the query.

Let me know if I missed your point.
 
Dev,

It would only let me put it in as below:
=DLookUp("[AddressLine]","Qry_Address4Form","[ContactID] =" & [ContactID]) but gives me a #Error
Any ideas?
Kent
 
Last edited:
Dev - got it!

This now returns the correct information:

=DLookUp("[Address2]","[Qry_Address4Form]","[ContactID] = Forms![Frm_Contacts]![ContactID]")

Thanks
Kent
 

Users who are viewing this thread

Back
Top Bottom