deepgrewal22
Instructor
- May 2, 2005
- 108
How do I query a table using SQL in a VBA module and return the result into a VBA variable?
Deep Grewal
"Microsoft Works" - oxymoron
Code:
Dim intCount as Integer
Dim strSQL as String
strSQL = "SELECT COUNT(*) FROM <table_name>;"
DoCmd.RunSQL (strSQL)
'How does intCount get set to the result of strSQL?
Deep Grewal
"Microsoft Works" - oxymoron