Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Access Form: Records

Posted on 2013-05-17
14
Medium Priority
?
357 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
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!

 
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
 

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 800 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses

971 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