I've no problems when deleting * records from local tables in my 2010 access db, but as I loop through my list and hit linked tables (local db, this is a fe/be setup) it fails with: Run-time error '3131': Syntax error in FROM clause. code:
If sanityCheck2 = vbYes Then
DoCmd.SetWarnings False
'list the tables to purge here
dalist = "tblLocal1 tblRemote-2 tblRemote-3"
darray = Split(dalist, " ")
For i = LBound(darray) To UBound(darray)
DoCmd.OpenTable darray(i)
DoCmd.RunSQL squirrel
Next
DoCmd.SetWarnings True
code works fine on tblLocal1, just not on any of the remotes.
I can open the table in datasheet and delete records no prob, just not through here.
tblLocal1) are you 100% suretblRemote-2is executing the same way you are thinking? Is that your real table name? And of course, we need to see the SQL.DELETE * FROM tblRemote-2pretty vanilla....