Delete query problem.

JGalletta

Windows 7 Access 2010
Local time
Today, 16:39
Joined
Feb 9, 2012
Messages
149
What am I doing wrong here???

Code:
DoCmd.RunSQL "DELETE tblScoutingRecords.*, tblScoutingRecords.[Record Number], tblFieldRecJoin.*, tblFieldRecInfo.* FROM (tblScoutingRecords INNER JOIN tblFieldRecJoin ON tblScoutingRecords.[Record Number] = tblFieldRecJoin.[Record Number]) INNER JOIN tblFieldRecInfo ON tblFieldRecJoin.JoinPK = tblFieldRecInfo.JoinPK WHERE (((tblScoutingRecords.[Record Number])=[Forms]![frmScoutingRecords]![Record Number]))"

It's giving me a "Run-time error '3128': Specify the table containing the records you want to delete."

Does this mean I cannot delete all of this stuff in this manner?
 
Pat, will enabling cascade delete only allow deletion in the downward direction of a hierarchical structure? i.e. Deleting a record from the second tier of a hierarchy will only delete records in the third, fourth, fifth, ... tiers, and not the first tier? If so, that function will prove useful for other parts of my application. Not knowing this is the only reason I haven't enabled it thus far.
 

Users who are viewing this thread

Back
Top Bottom