Solved

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

Posted on 2013-01-27
2
837 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: 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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

728 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