Access Delete with Pick List

Posted on 2009-04-28
Last Modified: 2012-05-06
In  Table A, I have a field, "States". (Table A has all 50 States) I will then be deleteing from Table A the States that have low incidences of breast cancer, from another Table B (obtained from public health site). Table B will be dynamic, and updated every month.

Rather than rewriting code, is it possible to use a Pick List where I can directly link Table A to Table B, and query to Delete any records in Table B that are also in Table B?

Hope this made sense.

Question by:tahirih
    LVL 10

    Accepted Solution

    How do you add records back in - why not just keep all states in table a and exclude states from table b using a left joined sql statement:
    SELECT Table1.state, Table2.State
    FROM Table1 LEFT JOIN Table2 ON Table1.state = Table2.State
    WHERE (((Table2.State) Is Null));

    Open in new window


    Author Comment

    I did think about a Left Join, but prefer to delete the records from the original table.

    The other option would be to create a new Table3 using INTO Tabe3.


    Author Closing Comment


    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
    Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
    Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now