select count of record into variable (1 Viewer)

suvagich

New member
Local time
Yesterday, 16:14
Joined
Apr 3, 2012
Messages
7
hi,
i want to select total count of records of table into variable.
so how can i do that using select query?

select count(*) into variable
from table ;

is this correct way????

thanx,
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 16:14
Joined
Aug 30, 2003
Messages
36,137
A VBA variable? No, you'd either use a DCount() or open a recordset on similar SQL.

VariableName = DCount(...)

With the appropriate arguments.
 

suvagich

New member
Local time
Yesterday, 16:14
Joined
Apr 3, 2012
Messages
7
Thnx a lot Paul...
your solution worked for me..

thnx...
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 16:14
Joined
Aug 30, 2003
Messages
36,137
Happy to help.
 

Users who are viewing this thread

Top Bottom