Query in form gives only top value. Need value for each record

BE19

cornfuzed
Local time
Today, 15:49
Joined
Mar 13, 2007
Messages
12
I developed a query which which searches for the closest value. I used dlookup() in the textbox to display that value. It is displaying however only the value of the very first entry, regardless of which record it is on.

Textbox query in form:

=DLookUp("[Aft1_query]![tbl_Aft1_ AWU]","Aft1_query")

What do I need to do so that when I toggle through the enties in the form, I get the query for that record? I tried adding a criterion such as =DLookUp("[Aft1_query]![tbl_Aft1_ AWU]","Aft1_query","[W&B]![ID]=[Aft1_query]![ID]")

Where W&B is the current form.

Ideas?

TIA
 
You have your sintax a bit wrong, it should be something like:

=DLookup("[FieldName]","TableName","[FieldName] = "Criteria")

if the criteria is a value in a form it should be:

Forms!frmFormName!FieldName = etc

Dave
 
The only criterion is that the record number of the query i.e. the matches the record number of the table. And actually both dlookups listed give the same result. How do I get query data (querey ID does correspond to the ID in the table) to scroll through with the table data?
 
I did. That's where the information came from in the first place. I used dlookup() to access the information but when I do and scroll through the records, I keep getting the first record in the query. The query records do not keep up with the table records.
 

Users who are viewing this thread

Back
Top Bottom