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
 

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

Back
Top