Link to home
Start Free TrialLog in
Avatar of jack3_99
jack3_99Flag for United States of America

asked on

Could not delete from specified tables

I have set up a Delete query in Access.  I am trying to delete records from the tblGLDetails table.  The criteria is based on a date stored in the DateCreated field in the tblExtractDate table.  There is only one date saved in the tblExtractDate table.

The records are displayed when I select View; however, I receive the error “Could not delete from specified tables” when I run the query.

Thank you in advance for your help.

The following is the SQL code for the query:
DELETE tblGLDetails.*, tblGLDetails.DateCreated, tblGLDetails.Senario
FROM tblGLDetails, tblExtractDate
WHERE (((tblGLDetails.DateCreated)>=[tblExtractDate]![DateCreated]) AND ((tblGLDetails.Senario)="Actual"));
[/indent]

The following is the Design view of the Access Delete query:
User generated image
SOLUTION
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jack3_99

ASKER

It works great.  Thank you for your help.  I appreciate it very much.