Getting result of a query in a variable

M

mieke.lamair

Hello,

I'm quite new to VBA and Access, but I want to get the result of a
select statement into a variable to be able to work with it.
The select statement will return only one value.

Can anyone help me on this?
 
A

Allen Browne

Use DLookup() to get the field from the query.

Explanation of how it works:
Getting a value from a table: DLookup()
at:
http://allenbrowne.com/casu-07.html
The article refers to a table, but you can put your query name where it
expects the name of the table.
 
Top