Populating variable with SQL statement

R

rmcompute

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

Dim intRecCount
DoCmd("Select Count(*) into intRecCount From tblTest")
 
R

Robert Morley

I believe what you want would be the following:

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



Rob
 
R

rmcompute

That worked. Thank you.

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

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



Rob
 
Top