Help with Access SQL Statement
Posted on 2009-05-07
I have an event procedure within an Access application that has the following query:
DoCmd.RunSQL "Delete * FROM [Payments] WHERE [Payments].OrderID = [Orders].OrderID AND [Orders].CustomerID = " & CustomerNumber & ";"
When it gets to this statement, it keeps prompting me for "[Orders].OrderID". Orders is a table in the database, and OrderID is the Primary key in that table.
for the life of me I cannot see what is wrong with this statement.
Can someone please help.