I have a query that gets a value from a table. How do I pass that value to a
variable?
With DLookUp:
variable = DLookUp("[fieldname]", "[queryname]")
This assumes that you're only interested in one field from the query,
and that the query returns only one record; DLookUp will return the
first value that it finds if the query has multiple records.
John W. Vinson[MVP]