473,387 Members | 1,365 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

The form view opens with the first record

9
I entered 5 records and closed the database, however, when I reopen to start data entry it starts from the first record. This posses a risk that mistakenly the entry operator may overwrite data. Is there a way to fix this problem, thus every time I open the database it starts from the record where I left?

Thanks
Aug 11 '06 #1
4 14144
MMcCarthy
14,534 Expert Mod 8TB
In the On Load event of the form in question add the following code:

Private Sub Form_Load()

'This will take you to the last record on the form
DoCmd.GoToRecord acActiveDataObject, "FormName", acLast

End Sub
Aug 12 '06 #2
MMcCarthy
14,534 Expert Mod 8TB
Actually if you just need the form for Data Entry you can do either of the following:

Private Sub Form_Load()

'This will take you to a new record on the form
DoCmd.GoToRecord acActiveDataObject, "FormName", acNewRec

End Sub

Or you could just set the Data Entry property of the Form to 'Yes'
Aug 12 '06 #3
Arif
9
Thanks a lot. As I mentioned earlier that I am a novice in Access, hence you may find some questions as 'stupid'.

Where to find the 'on load' event? I was looking for it but did not find.

Thanks
Aug 14 '06 #4
MMcCarthy
14,534 Expert Mod 8TB
In the design view of the form, click outside of the main form area. Ideally, click on the little grey square at the top left edge of the form. Right click here and go to properties. Make sure the Heading of the properties says Form.

Go to the Event tab and scroll down until you see On Load. In the box put [Event Procedure] and then click on the button with the dots beside it. The Form_Load event procedure should open and you just have to add the code.
Aug 14 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Nothing | last post by:
I have a form that opens. On this form there is information along with a button that opens a payment form. The payment form opens and I enter a payment type, cash check or charge, a payment...
2
by: Simon Pleasants | last post by:
Am something of a newbie at this, so please bear with any stupid questions. I have created a database to track shipments that we import. The information is stored in a table and I have created...
2
by: j.mandala | last post by:
This had got to be something obvious that I am too blind to see! Funny problem: one of my users has my application linked to a SQL Server Backend. Front end it Access XP (SP3). The first form...
1
by: jv | last post by:
I have quite a few of continuous form and subform where I do allow scroll bars. I run into problems with the mouse wheel whenever the data on the form does not take up the whole page. In this...
5
by: MLH | last post by:
I have a form used for both editing and the entry of new records named frmAdminDoListEntryForm. It has 2 fields on it: ProjName and Rev. The form's record source is qryAdminDoList. ProjName and...
10
by: Mike L | last post by:
This is for a Win form. Currently, the first record is shown in the combo box. I want the combo box to be blank and when the user clicks on the down arrow to choose from the list and clicks on...
22
AccessIdiot
by: AccessIdiot | last post by:
Hello all, I have a form (frm_Entrainment) with a button that opens a 2nd form (frm_Specimen_Entrainment). The 2nd form shares an ID field with the first form (Entrainment_ID - its like opening...
3
by: sudhashekhar30 | last post by:
hi all i am using formview control(asp.net 2.0) 1rst time. don't know much about it. i want to display record in it from different tables at different time. like 1rst time form view is showing...
3
by: mckbill | last post by:
Is there a way I can direct the cursor to a specific field (variable) in a form by typing the field name while in form view? I have a form with many fields, and it would be nice if there were...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.