By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,225 Members | 1,434 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,225 IT Pros & Developers. It's quick & easy.

Assign Query Result To Avariable

P: 68
I know how to use queries but what if there is a button on a form that use a query to assing the result to a value?

For example

this query will gives the totall of the all employees whish is 5

Expand|Select|Wrap|Line Numbers
  1. SELECT Count(*) FROM Employees;
I want to use this query throw a from to assing the result to a variable, For instance:

Expand|Select|Wrap|Line Numbers
  1. Dim x as Integer
  2.  
  3. x= ???
  4.  
can anyone advise how to assing the query to X ?
Jul 15 '09 #1
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 1,287
Check out the DCount function, among others. DLookup is also very useful.
Jul 15 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.