Solved

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

Posted on 2013-01-27
2
822 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

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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…

732 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