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("
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.