Assign query results to variable? (ACC97)

K

Kyle [EAS]

Hello! I've got a select query that returns a single field. Is it possible
for me to assign the result of this query to a variable? Something like
this:

var = query.query_result

Thanks!
 
D

Dirk Goldgar

Kyle said:
Hello! I've got a select query that returns a single field. Is it
possible for me to assign the result of this query to a variable?
Something like this:

var = query.query_result

Use DLookup. The first argument would be the name of the field returned
by the query, and the second argument would be the name of the query.
For example,

var = DLookup("ResultField", "MyQuery")
 
Top