Results 1 to 6 of 6
  1. #1
    Join Date
    May 2019
    Posts
    7

    Using a Delete Query to Flag for Generic Account Numbers


    I have a question regarding running a delete query in MS Access and the capabilities that come with it. If I have a database built with various names and their respective account numbers, and of those names, roughly 5-10 have the same generic account number ("0000" or "9999"), how would I go about flagging for these generic account numbers? Ideally I would like to be able to check for generic account numbers on a weekly or monthly basis to make sure the data stays consistent and clean.

  2. #2
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    I am not quite clear on your question.
    Are you want to delete the records or flag them?

    You would use a "DELETE QUERY" to physically delete/remove the record from the database.
    You would use an "UPDATE QUERY" to update a field on a record (like a "flag" field).
    You would use a "SELECT QUERY" to simply return records that meet specific criteria.

  3. #3
    Join Date
    May 2019
    Posts
    7
    I would want to flag the accounts with generic account numbers and update them with a new, unique account number.

  4. #4
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    OK, you would use an UPDATE QUERY to do that, and in the Criteria field under the Account Number, enter:
    Code:
    "0000" or "9999"
    and you would enter the new Account Number you want on the "Update To" line of the Account Number field.

    If you do not know how to create Update Queries, check out this tutorial: https://www.youtube.com/watch?v=Sh3r8VaBdf4
    There are many other tutorials and articles you can find by Googling "Create Update Query in Microsoft Access".

  5. #5
    Join Date
    May 2019
    Posts
    7
    Thanks, much appreciated!

  6. #6
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    You are welcome.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Using Query to Flag changes in crafts
    By Blankman in forum Queries
    Replies: 3
    Last Post: 11-30-2015, 03:30 PM
  2. Replies: 4
    Last Post: 05-07-2015, 03:49 PM
  3. Replies: 21
    Last Post: 01-21-2014, 05:04 PM
  4. Multiple account numbers
    By BenM912 in forum Forms
    Replies: 1
    Last Post: 03-21-2011, 10:47 AM
  5. Newbie Help Account Numbers
    By Eric1066 in forum Access
    Replies: 3
    Last Post: 10-23-2009, 03:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums