Assign query results to variable? (ACC97)

  • Thread starter Thread starter Kyle [EAS]
  • Start date Start date
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!
 
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")
 
Back
Top