Results 1 to 4 of 4
  1. #1
    B30 is offline Novice
    Windows Vista Access 2007
    Join Date
    Sep 2014
    Posts
    21

    Do not save record with tab all the way through

    I am new to Access (and databases) and my terminology is slack. I am creating a form and I have a "Save Record" button at the end of the form for the info to update the table. Currently, if I tab all the way through the form and tab past the "Save" button, it will save the record. I want to change it so that the button has to be clicked to update the table, and not allow the tab button to update it. Thanks for the help.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    Sorry, in access, moving off a record is an automatic save. (be it arrow, or tab, etc) Its a passive action.
    The button idea is just a formality for users to think they did something.

  3. #3
    B30 is offline Novice
    Windows Vista Access 2007
    Join Date
    Sep 2014
    Posts
    21
    Thanks for the help anyway.

  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by ranman256 View Post

    ...The button idea is just a formality for users to think they did something...
    That really sums it up well! What you can do, to prevent 'accidental' saving, is to check with the user to see whether or not they want to save the new or edited Record:
    Code:
    Private Sub Form_BeforeUpdate(Cancel As Integer)
    
    If Not (Me.NewRecord) Then
      If MsgBox("Would You Like To Save The Changes To This Record?", vbQuestion + vbYesNo + vbDefaultButton1, "Save Changes to Record ???") = vbNo Then
       Me.Undo
      End If
    Else
      If MsgBox("Would You Like To Save This New Record?", vbQuestion + vbYesNo + vbDefaultButton1, "Save This New Record ???") = vbNo Then
       Me.Undo
      End If
    End If
    
    End Sub

    If they select 'No' from the Messagebox the New Record or changes to the Existing Record will be dumped.

    Linq ;0)>

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

Similar Threads

  1. save new record problem
    By msasan1367 in forum Access
    Replies: 11
    Last Post: 06-30-2013, 08:57 AM
  2. Replies: 3
    Last Post: 10-08-2012, 08:40 AM
  3. Replies: 8
    Last Post: 09-27-2012, 11:12 AM
  4. save record
    By ashu.doc in forum Forms
    Replies: 4
    Last Post: 08-13-2012, 08:13 PM
  5. Replies: 4
    Last Post: 05-08-2012, 08:07 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