Populating variable with SQL statement

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The code below creates a table. Is it possible to populate a variable
instead ?

Dim intRecCount
DoCmd("Select Count(*) into intRecCount From tblTest")
 
I believe what you want would be the following:

Dim intRecCount As Integer
intRecCount = DCount("*", "tblTest")



Rob
 
That worked. Thank you.

Robert Morley said:
I believe what you want would be the following:

Dim intRecCount As Integer
intRecCount = DCount("*", "tblTest")



Rob
 
Back
Top