Solved

Access Form: Records

Posted on 2013-05-17
14
342 Views
Last Modified: 2013-05-21
I have an Access 2007 form that has 15000 records and when the form is opened it starts at record 1 how do i get it to open at a new record for input.
0
Comment
Question by:CMILLER
  • 6
  • 6
  • 2
14 Comments
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 39175778
Set the DataEntry Property of the form to: Yes
0
 

Author Comment

by:CMILLER
ID: 39175790
When I set that to yes, it opens with a new record 1 of 1. I would like for it to open either at the last form entered or at a new one after the last one entered.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 39175792
However this would be better managed from a "Menu" form.
From this Menu form you would select the mode to open the form in

1. Edit
2. Read Only
3. New Record

Code on "Edit" button:
Docmd.OpenForm "YourFormName"

Code on the "Read Only" Button:
Docmd.OpenForm "YourFormName",,,,acFormReadOnly

Code on the "New Record" Button:
DoCmd.OpenForm "YourFormName", , , , acFormAdd


JeffCoachman
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 39175812
<When I set that to yes, it opens with a new record 1 of 1. I would like for it to open either at the last form entered or at a new one after the last one entered. >
So you want to open the form with all the records available, but to be on a new record.

You need to do this with code;

On the Open Event of the form, put code like this:

DoCmd.GoToRecord , , acNewRec


JeffCoachman
0
 

Author Comment

by:CMILLER
ID: 39175861
Do I add that in the macro that opens the form?
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 39176011
No, you add that to the "Open" event of the form.

If you need this in a maco format it is:
Action:  GoToRecord
Arguments:  , , New,
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 39176031
Like so:
Database44.accdb
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:CMILLER
ID: 39176151
I wasnt able to open the DB.

Check out the attachments.
Form.JPG
0
 

Author Comment

by:CMILLER
ID: 39176153
0
 

Author Comment

by:CMILLER
ID: 39176155
Do I have it correct in the Form.jpg
0
 
LVL 29

Expert Comment

by:IrogSinta
ID: 39176391
That is not where you would put the DoCmd code.  Click on the ellipses {...} so that the code editor will open up and paste the code in there.
0
 
LVL 29

Accepted Solution

by:
IrogSinta earned 200 total points
ID: 39176392
It should look similar to this:
Private Sub Form_Load()
    DoCmd.GoToRecord , , acNewRec
End Sub
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 39176522
...or (as I stated) if you need this in a macro....
Click the ellipses [...] for the Open event of the form, and select "Macro builder"

Then build your macro similar to this:
Action:  GoToRecord
Arguments:  , , New,
0
 

Author Closing Comment

by:CMILLER
ID: 39184068
Thanks.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

706 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

17 Experts available now in Live!

Get 1:1 Help Now