Assign Query Result To Avariable

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ahd2008
    New Member
    • Nov 2008
    • 68

    Assign Query Result To Avariable

    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

    Code:
    SELECT Count(*) FROM Employees;
    I want to use this query throw a from to assing the result to a variable, For instance:

    Code:
    Dim x as Integer
    
    x= ???
    can anyone advise how to assing the query to X ?
  • ChipR
    Recognized Expert Top Contributor
    • Jul 2008
    • 1289

    #2
    Check out the DCount function, among others. DLookup is also very useful.

    Comment

    Working...