M
msnews.microsoft.com
I received this help previously, but am not sure how it applies, can someone
please direct me>
How do I apply Dlookup to a query?? The query is called from a form
on save, and it's function is to update the inventorycounter field.
I did have the WHERE clause working, but would like to use the DLOOKUP so
that I can use this query from multiple forms.
Now, you have a choice how you apply the criteria to the
query. You can add the WHERE clause we have been
discussing:
WHERE inventorycounter = Forms!nameofform.inventorycounter
to the query and just look up the calculated value in a text
box's control source expression:
=DLookup("EquipmentID", "nameofquery")
Or, you can leave the WHERE clause out of the query and
apply the criteria in the DLookup:
=DLookup("EquipmentID", "nameofquery", "inventorycounter="
& inventorycounter)
Personally, I prefer the latter because it makes the query
independent of the form. BUT, it might(?) have poorer
performance. If there is a significant performance penalty,
then use the former approach.
please direct me>
How do I apply Dlookup to a query?? The query is called from a form
on save, and it's function is to update the inventorycounter field.
I did have the WHERE clause working, but would like to use the DLOOKUP so
that I can use this query from multiple forms.
Now, you have a choice how you apply the criteria to the
query. You can add the WHERE clause we have been
discussing:
WHERE inventorycounter = Forms!nameofform.inventorycounter
to the query and just look up the calculated value in a text
box's control source expression:
=DLookup("EquipmentID", "nameofquery")
Or, you can leave the WHERE clause out of the query and
apply the criteria in the DLookup:
=DLookup("EquipmentID", "nameofquery", "inventorycounter="
& inventorycounter)
Personally, I prefer the latter because it makes the query
independent of the form. BUT, it might(?) have poorer
performance. If there is a significant performance penalty,
then use the former approach.