Results 1 to 2 of 2
  1. #1
    tmartin is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Mar 2015
    Posts
    37

    Post Have Admin Form and trying to delete records from Employee Table


    Forms
    Admin Menu - ButtonName: Delete Employee (calls Delete Menu and runs query to populate dropbox)
    Delete Menu - Dropdown box populated with Employee's name (field 0) and Employee'q ID (field 1)
    Administrator selects Employee's from dropdown list to remove
    ButtonName: Delete Button call OnClick event

    OnClick event MsgBox displays selected Employee name and ID.
    DESIRE TO DELETE THE ROWS FROM THE DATABASE and RETurn CONTROL BACK TO
    DELETE MENU.

    In Access I created a delete query and can manually remove the data from the database.
    Is there a way to execute this query from VBA to remove the row in the database?

    Thanks

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Since I assume the query has a form reference, try

    DoCmd.OpenQuery "QueryName"
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 1
    Last Post: 08-18-2014, 07:55 AM
  2. Replies: 1
    Last Post: 04-14-2014, 11:44 AM
  3. Replies: 2
    Last Post: 01-24-2012, 02:16 PM
  4. Delete all records in a table?
    By bob646 in forum Access
    Replies: 1
    Last Post: 05-20-2007, 11:41 PM
  5. Replies: 5
    Last Post: 05-02-2006, 11:25 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