G
Guest
I am trying to get a count of records in a table. Currently my code looks
like this:
strsql = "Select Count(*) From TempFleet where MO > " & intMo & " and YR =
" & Tyr
Set incount = CurrentDb.Execute(strsql)
When I do a debug.print on the code and run it a SQL version of the query it
works. I know that Current.Execute (strsql) doesn't work for a select
statement. I've tried other methods and none working.
Could someone tell me how to run fix this code?
Thanks in Advance!
like this:
strsql = "Select Count(*) From TempFleet where MO > " & intMo & " and YR =
" & Tyr
Set incount = CurrentDb.Execute(strsql)
When I do a debug.print on the code and run it a SQL version of the query it
works. I know that Current.Execute (strsql) doesn't work for a select
statement. I've tried other methods and none working.
Could someone tell me how to run fix this code?
Thanks in Advance!