473,396 Members | 1,972 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,396 software developers and data experts.

Open form in LAST+1 (new) record

135 100+
Hello

Is there a way to indicate a form that it should open in the LAST+1 record, so that the user can start entering information directly. Because right now when the user opens the form, it displays the first record information which by accident is always modified.

Thanks
Sep 24 '07 #1
10 2356
cyberdwarf
218 Expert 100+
Hi Gilberto,

Try using the DoCmd.GotoRecord statement. One of the parameters tells you which record to go to and includes the option "acNewRec".

HTH

Steve
Sep 24 '07 #2
Gilberto
135 100+
Hi Gilberto,

Try using the DoCmd.GotoRecord statement. One of the parameters tells you which record to go to and includes the option "acNewRec".

HTH

Steve
Thanks cyberdwarf.

Im trying the following but its not working...it still opens on record #1...any ideas???

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2. DoCmd.GoToRecord , , acNewRec
  3. End Sub
Sep 24 '07 #3
cyberdwarf
218 Expert 100+
Gilberto

What is the data source of your form? (Please give full details)

Steve
Sep 24 '07 #4
Gilberto
135 100+
Gilberto

What is the data source of your form? (Please give full details)

Steve
Hello,

Data source is: Engineering (which is the table containing all the fields in this form)
The data entry property of the form is set to: NO

I have already 195 records saved. I tried enabling the DATA ENTRY but then the 195 records "disappear", they are not deleted from the table but in the record selector there are GONE.

HELP...
Sep 24 '07 #5
cyberdwarf
218 Expert 100+
Gilberto

Make sure that AllowAdditions/AllowDeletions/AllowEdits are set to YES, then try again.

The DataEntry property allows ONLY new records (that's why you can't see existing records if DataEntry=Yes)

HTH Steve
Sep 24 '07 #6
missinglinq
3,532 Expert 2GB
This is somewhat curious, because the code should work unless, as Cyberdwarf suggested, AllowAdditions were set to No! The curious part is that if AllowAdditions were set to No, the code should cause a "Cannot go to record" error to occur.

Linq ;0)>
Sep 24 '07 #7
Gilberto
135 100+
Hello again,

I tried again with DATA ENTRY=YES and i think it IS working. Every time i open the form it lines will be clear and i can enter NEW information. The problem now is that i CANT go/edit previous record which i NEED to do.

Just to be clear:
Right now the referred properties are all = YES, except for DATA ENTRY=NO.
Ive been working like this and it works perfectly, as sometimes i have to complete/modify/delete information on previous records. The only thing i want to avoid is that every time i open the form and want to continue entering NEW records (which is much more common that modifying previous ones) i have to go to the last record + 1 so that i can start.

This is NO big deal i was just wondering it there was a simple way to go DIRECTLY to this NEW record BUT also having the possibility to navigate the records i already have.

Thanks again,
Gilberto
Sep 24 '07 #8
cyberdwarf
218 Expert 100+
Gilberto

I have just created a small form to do what you want & it worked first time!!!!

AllowEdit/AllowDelete/AllowInsert = Yes; DataEntry = No

OnLoad event includes:-
Expand|Select|Wrap|Line Numbers
  1. DoCmd.GoToRecord , , acNewRec
?????

Steve
Sep 24 '07 #9
Gilberto
135 100+
Gilberto

I have just created a small form to do what you want & it worked first time!!!!

AllowEdit/AllowDelete/AllowInsert = Yes; DataEntry = No

OnLoad event includes:-
Expand|Select|Wrap|Line Numbers
  1. DoCmd.GoToRecord , , acNewRec
?????

Steve
Thanks Steve, it DOES work now. I had a "me.requery" in the form_load which was creating the problem.

Gilberto
Sep 24 '07 #10
Gilberto
135 100+
[quote=Gilberto]Thanks Steve, it DOES work now. I had a "me.requery" in the form_load which was creating the problem.
Sep 24 '07 #11

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

Similar topics

8
by: Neil | last post by:
I have a very puzzling situation with a database. It's an Access 2000 mdb with a SQL 7 back end, with forms bound using ODBC linked tables. At our remote location (accessed via a T1 line) the time...
55
by: Steve Jorgensen | last post by:
In a recent thread, RKC (correctly, I believe), took issue with my use of multiple parameters in a Property Let procedure to pass dimensional arguments on the basis that, although it works, it's...
4
by: Dalan | last post by:
I presume that using an open recordset method is the preferred method of accomplishing what I'm trying to do. Of course, if there are other options that would work, feel free to share them. I...
3
by: BLUE WATER | last post by:
Hi, I have managed to simplify my problem but can't seem to get this to work. I want to open up a form from a click event of another form, but not only open the form when the button is pressed...
3
by: Chris | last post by:
Hello all. I have a database that I use to send email updates to people. Everything is working fine, but one suggestion I keep getting is to add a link to the automatic emails that will open up the...
4
by: sara | last post by:
I am learning with a simple application/form. I am ok - enter customer name, list box of customers, select a customer, see the items for that customer. The items form has customer ID and Name...
4
by: piscogirl | last post by:
Hi all, Here's my case: I have a form: Event Form and a subform: AttendanceSubForm The user selects a name (from a Person Table) on the subform to register for the event. If the name is...
9
by: mtgrizzly52 | last post by:
Hi all, I've looked for an answer for this in lots of books, online in several discussion groups and have not found the answer which I feel may be very simple. What I want to do is have a...
1
by: Coll | last post by:
Hi - I'm trying to figure out how to append a record to a table and then open a form and display that record. My thought was to use the autonum primary key field (recordnum) and display the highest...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.