[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

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.
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.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
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.

656 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