Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Delete Table Records from VBA

    Hi,

    I have used the access queries to lookup particular records of clients where we have never used their information so they are redudant and no longer needed. All 4062 of them.

    The information is based upon looking in another 4 tables to see if their unique identifier exists in these other tables.

    There is not an option to delete the records on the query.

    So I think the only way it to have a vba code to loop through the query and delete records based upon the 'PurchID'.

    The client records are stored within 'tblPurchaser' and the query is called 'qryPurchasersWithNoRecords'

    How can I achieve this?
    Best Regards,

    Luke

  2. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,433
    Thanks
    371
    Thanked 1,456 Times in 1,325 Posts
    Quote Originally Posted by Lstclair55 View Post
    Hi,
    There is not an option to delete the records on the query.
    Ah but there is! See this MS Article.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  3. #3
    3 Star Lounger HiTechCoach's Avatar
    Join Date
    Sep 2011
    Location
    Oklahoma City, OK
    Posts
    200
    Thanks
    0
    Thanked 31 Times in 30 Posts
    An there is also this: Subquery basics
    Boyd Trimmell aka HiTechCoach (Access Information here)
    Microsoft MVP - Access Expert
    "If technology doesn't work for people, then it doesn't work."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •