Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2007
    Location
    Belo Horizonte, Brazil
    Posts
    1

    Delete a record

    Dear all



    I have a form that exhibit the data of a query. When closing the form I want to delete the last record if it doesnīt respect some rules. I donīt have problems to define the rules, but I donīt know a visual basic instruction to delete the record.

    Can someone help me?

    Thanks, Crocco.

  2. #2
    jya is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2007
    Location
    Chicagoland
    Posts
    109
    I don't know what you query looks like, but would this work?

    DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
    DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

    I got the code using the command button wizard. You can then copy it wherever you need it and delete the command button.

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

Similar Threads

  1. Need to delete special characters
    By tlrutledge in forum Queries
    Replies: 1
    Last Post: 08-23-2013, 03:10 AM
  2. Replies: 0
    Last Post: 08-25-2008, 12:17 PM
  3. Delete all records in a table?
    By bob646 in forum Access
    Replies: 1
    Last Post: 05-20-2007, 11:41 PM
  4. Could not delete from specified tables.
    By bullwinkle55423 in forum Queries
    Replies: 0
    Last Post: 08-31-2006, 08:14 AM
  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