Getting result of a query in a variable

  • Thread starter Thread starter mieke.lamair
  • Start date Start date
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?
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top