?
Solved

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

Posted on 2013-01-27
2
Medium Priority
?
926 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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

850 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