Share via

Delete query Error message

Anonymous
2018-03-17T19:12:45+00:00

I created a Delete query and when I run the query I get the following error message: "Specify the table containing the records you want to delete".

Below is all the information on the tables and the design of the query. What I need to know is where I went wrong and how do I specify the table for the records to delete. Please try to be a little specific as I am not that good at access most of what I do is from a book and searching the communities.

I have two tables in the query as follows:  1- MemberInfo       2-Dues

One to many relationship with the MemberInfo table on the one side, and the Dues table on the many side.

Referential integrity is enforced

Cascade Delete Related records is checked.

In the query I have the following in the design window.

Field: MemberID

Table: MemberInfo

Delete: Where

Field: LastName

Table: MemberInfo

Delete: Where

Field: FirstName

Table: MemberInfo

Delete: Where

Field: Deceased

Table: MemberInfo

Delete: Where

Criteria: False

Field: Dues Year

Table: Dues

Delete: Where

Criteria: <Year(Date())-2

Thanks for any help.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

6 answers

Sort by: Most helpful
  1. Anonymous
    2018-03-18T16:30:00+00:00

    Ok I removed the group by then deleted the SQL and pasted in the new SQL. I ran the select query and it should have only shown 1 record but came up with 3.

    However I did some thinking and tried something different. I have another delete query that deletes only all dues records past 3 years (<2018,2017,2016). When I ran that delete query first and than ran my update expired query which check marks anyone who did not pay there dues for last year (2017) before Jan 1, 2018 and then ran the Delete expired query I got the results I needed.

    I then made a copy of the database and went into the delete expired query and changed the criteria to <2019-2 and ran the query and it deleted all of the records from 2016 that were expired.

    This seems to be working fine. Thanks for all of your help. My database is now completed all the way.

    Thank you

    Was this answer helpful?

    0 comments No comments