View Full Version : DLookup in text boxes


jprma
08-27-2002, 11:31 PM
Hi Friends,

I have a form (frm1) on which I have added three textboxes (txt1,txt2 and txt3) to lookup data from a query named QUERY1.

This is a regular query with a Group By function. The field name of my query is named CODES. The Group by function is necessary since my query has three criteria and I like to shop up the Code with the number or records:
My three criteria are: "NAME", "LASTNAME" and "ZIP".

In the textboxes I would like to add the DLookup function but do not know how to restrict the search for each criteria. This is how I have written the code:
=DLookUp("[CODE]","QUERY1")
Obviously this will not show what I want. I would like to restrict the DlookUp to a specific criteria, for example NAME and do not know where to add it in the above code.

How and where can I write the criteria?

Could you please write for me the coding?

Thanks.

Travis
08-28-2002, 08:01 AM
See Microsoft Knowledgebase Article:

ACC2000: DLookup() Usage, Examples, and Troubleshooting
ID: Q208786