Solved

Auto start next record entry after completion of current record in access

Posted on 2013-01-27
2
741 Views
Last Modified: 2013-01-27
Hi

Microsoft Access 2010 working in a continuous form.

I have screen where the user enters data into 15 or so fields.     The primary key is [StockNum].


When the user has entered data into the last field [Rec Creation Date],  then I would like to automatically enter the edit mode for the next record that needs to be entered.

Could someone please tell me the event and criteria so that I can jump start the next record with the following code after they  tab through or otherwise save the new record that they have just entered.

[StockNum] = Nz(DMax("[StockNum]", "[tblStockItems]")) + 1


Thanks
0
Comment
Question by:peispud
2 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 500 total points
ID: 38824986
Try this -

- Make sure that your  [Rec Creation Date] is set as the last tab stop on the form
- Make sure the "Enter Key Behavior" for that field is set to "Default Behavior"

Like this, tabbing or hitting enter in that field will take you to a new record, automatically saving the current record

Then in the Current Event of your form:

If Me.NewRecord = true then Me.StockNum = Nz(DMax("[StockNum]", "[tblStockItems]")) + 1

Open in new window

0
 

Author Closing Comment

by:peispud
ID: 38825109
Perfect...


Thanks
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

747 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

9 Experts available now in Live!

Get 1:1 Help Now