Delete query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,
Someone please tell me, where did I go wrong with this code?
SQL = "Delete TBL1.A, TBL1.B, TBL1.C, TBL1.D, TBL1.E, TBL1.F, TBL1.G " & _
"FROM TBL1"
DoCmd.RunSQL SQL
I have received SYNTAX ERROR - ERROR 3075
Thanks in advanced
 
Hey,

You don't seem to have a semi-colon (;) at the end of your SQL string.
That might be it.

Cheers - David
 
There's really no need to include the field names in a DELETE statement:
you're deleting entire rows, not simply fields.

Try:

SQL = "DELETE FROM TBL1"

or

SQL = "DELETE * FROM TBL1"
 
Back
Top