Results 1 to 2 of 2
  1. #1
    aligahk06 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Posts
    94

    Forms have embedded macro called add record and save the record in table related ?

    Dear all,



    i have a input form with embedded macro ( called add record ), while clicking on add record for next record data inputs it works fine but what happen it any input made in any textbox of the form it saves the record in the table even though accidentally closing the forms.

    i want to save records in table only if i click the button save record( embedded macro). But it saves the record without clicking the save record macro.
    because sometime i need to cancel the add record while in input mode.

    I would appreciate for solution ?

    thanks for valuable time.

    have a nice day !!!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Record is committed to table when: 1) close table/query/bound form; or 2) move to another record; or 3) run code to save.

    Use code in form BeforeInsert and/or BeforeUpdate event to verify user wants to save record. Review https://docs.microsoft.com/en-us/off...reInsert(even)
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 4
    Last Post: 12-04-2019, 02:33 PM
  2. Replies: 17
    Last Post: 01-25-2018, 08:03 PM
  3. Replies: 15
    Last Post: 03-05-2015, 03:30 PM
  4. Replies: 40
    Last Post: 08-20-2013, 11:38 PM
  5. Replies: 8
    Last Post: 09-20-2012, 12:13 PM

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