Link to home
Start Free TrialLog in
Avatar of T77DW
T77DW

asked on

SQL Count in Access Module

I want to perform an SQL Count within an Access VB module and put that value into a variable.

I know how to word the SQL statement

SELECT COUNT(*) FROM tbl

But cannot figure out how to proceed from there in terms of executing this statement.

Its an easy question and I'm hoping someone can help.
Avatar of njelger
njelger

Dim iCnt As Integer
iCnt = DCount("*", "tbl")

/ j
ASKER CERTIFIED SOLUTION
Avatar of i014354
i014354

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
RECOMMENDATION: Accept i014354's Comment as Answer
Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Trevor
EE Cleanup Volunteer