PDA

View Full Version : Solved: Error in the query



kbsudhir
05-13-2009, 11:59 AM
Hi All,

I am using the below code to find the max value in access 2003 from excel 2003.
rs.Open "SELECT Max(A_Table.Num) AS FROM A_Table", cn, adOpenStatic, adLockOptimistic

But I am getting the below error:


The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the puntuation is incorrect

Please guide.

Regards
Sudhir

CreganTur
05-13-2009, 01:14 PM
It's the 'AS' that's screwing you up. Remove it, and you'll be fine... either that, or enter a placeholder name after the 'AS'.