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
 

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

Top