Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003

    Red face Unanswered: Delete a record. "asking for simple procedure"

    Hello everyone. I want to delete a record in a database "Employees" using the employee number. I tried to use an action query "Delete" and run it using a command button but the command button wizard does not recognize the query. "It does not show its name in the list of queries". On thing i also tried was writing a macro to run the delete query but it did not work even thought the macro appeared on the list of macros.

    I need a simple way of asking for the badge numbe to be deleted and delete the coresponding record from my update employee form.

    Note that i am an access beginner but i am learning alot by the minute !
    Thank you very much.

  2. #2
    Join Date
    Dec 2002
    Préverenges, Switzerland
    you have delete query delQry and a button YourDeleteButton

    private sub YourDeleteButton_Click()
    docmd.setwarnings false 'optional - will block "are you sure" messages
    docmd.openquery ("delQry")
    docmd.setwarnings true 'reinstates "are you sure" messages if turned off
    end sub


Posting Permissions

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