473,387 Members | 1,745 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.

Default to Last Record opn a Form

Hi All

I need to default to the Last Record when a form opens.

Can someone please help me on how to do this?

Much appreciatiated
Jun 26 '06 #1
2 8131
Use the following code in the form's OnOpen event

Dim rs as DAO.Recordset
Set rs = formname.form.RecordsetClone
rs.MoveLast
frmname.form.Bookmark = rs.Bookmark
Set rs = Nothing

Manny wrote:
Hi All

I need to default to the Last Record when a form opens.

Can someone please help me on how to do this?

Much appreciatiated


Jun 26 '06 #2
On Mon, 26 Jun 2006 20:25:44 +0200, Manny wrote:
Hi All

I need to default to the Last Record when a form opens.

Can someone please help me on how to do this?

Much appreciatiated


Code the Form's Open event:

DoCmd.RunCommand acCmdRecordsGoToLast
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Jun 26 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: sixsoccer | last post by:
I have built a database with a <Mainform> and a <Subform>. My problem is twofold. 1. My subform is set as a continuos form with AllowAddiotions set to NO (ie. a list of Issues to the client on...
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...
1
by: feck | last post by:
I have a database with several tables, one of which is I use this to bring up a form so you can unlock the record (set by using a yes no box on the data input form to prevent unauthorised...
2
by: marko | last post by:
I don't know how to form my question but this is my problem: I would like to fill out a form containing let's say 3 fields and then when i go to the next record. Now the next record would be blank...
2
by: Robert | last post by:
I have a label on my form lblCount and the following code in my form for displaying a record count: Private Sub Form_Current() Me.RecordsetClone.Bookmark = Me.Bookmark Me!lblCount.Caption =...
4
by: Rico | last post by:
Hi All, Just wondering, in vb code, how to if the last record on a cascading form is the current record? Thanks!
0
by: Andrew | last post by:
Hi all A quick question which I've not been able to solve from trawling the web. Is it possible to have a control in the detail section of a form set to a default view of "Continuous" which...
7
by: robtyketto | last post by:
Greetings, I have a main form. Upon filling in a combo box it then displays a subform (based on a query that uses values in the combo box on where clause) THe subform has the paramater Data...
3
by: Sam Zuhbi | last post by:
Hi, I was wondering how do I make the next record button on my access 2007 form stop at the last record, I want to make sure that if it does not create a new record if it reaches the last record...
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: 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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.