J
Jacco
Hi everyone, I'm trying to run this SQL query with DoCmd.RunSQL but it keeps
giving a error
It should count the amount of aircraft with a lbk_id (a column in table
Aircraft)
Dim count_old_aircraft As String
count_old_aircraft = "SELECT Count(Aircraft.lbk_id) " & _
"AS CountOflbk_id FROM Aircraft " & _
"HAVING (((Count(Aircraft.lbk_id))<>0));"
DoCmd.RunSQL count_old_aircraft
Error:
2342 - A RunSQL action requires a argument consisting of an SQL statement.
Any help is welcome....
Jacco
(and if it works: how do I retrieve that number so I can display it in
MsgBox or something)
giving a error
It should count the amount of aircraft with a lbk_id (a column in table
Aircraft)
Dim count_old_aircraft As String
count_old_aircraft = "SELECT Count(Aircraft.lbk_id) " & _
"AS CountOflbk_id FROM Aircraft " & _
"HAVING (((Count(Aircraft.lbk_id))<>0));"
DoCmd.RunSQL count_old_aircraft
Error:
2342 - A RunSQL action requires a argument consisting of an SQL statement.
Any help is welcome....
Jacco
(and if it works: how do I retrieve that number so I can display it in
MsgBox or something)