Solved

Prevent Tab from creating new record

Posted on 2014-02-24
3
966 Views
Last Modified: 2014-02-26
I am working on a form with several tab stops.  At the end of the form if the user isn't careful pressing tab saves the current record and starts a new record.  Is there any way to prevent Tab from creating a new record.
0
Comment
Question by:Mwvarner
3 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 39883617
You can set the Form's Cycle property to "Current Record", which will keep the user on the same record.

Open the form in Design view and select the Other tab in the Properties dialog, and you'll see the Cycle property.
0
 
LVL 35

Expert Comment

by:PatHartman
ID: 39883819
Access forms are designed to save records.  Any time you move the focus to a new record or close the form, etc.  Access will save the current record.

Changing the Cycle property to Current Record as Scott suggested will keep the user from inadvertently tabbing to a new record but if you are trying to get control of the save process, use the FORM's BeforeUpdate event.  That is the last event that fires before a record is actually saved and you can't avoid it so it is the perfect event to use for final validation and to cancel the save if that is your intention.
0
 

Author Closing Comment

by:Mwvarner
ID: 39888689
Thanks,  That is what I needed.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
A Function to parse a text string 4 36
Help with DoEvents 8 26
split XML field into many fields from MS Access 21 24
Display <> "Yes" records 10 8
In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question