Solved

Prevent Tab from creating new record

Posted on 2014-02-24
3
950 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 34

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

896 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now