Navigating to NEWEST RECORD

B

Bill Mitchell

What is the best way to programmatically navigate to the
most recently created record on a continuous form? I use
random numbering for my Primary Key so that wont work.

I have been setting a DateID value for each record that
defaults to Now() when the record is created then I look
for DMax("[DateID]",MyTable) to find it.

I am not sure how well this will work in multiuser
though. When I ask to go to the most recent record there
will it go to the one i've created or the one most
recently created by anyone?

Any elegant workarounds on this? I am guessing there is
something built-in somehwhere i dont know about.
 
M

Michel Walsh

Hi,


use the bookmark LastModified:


Me.Bookmark = Me.RecordsetClone.LastModified


Hoping it may help,
Vanderghast, Access MVP
 
B

Bill Mitchell

Thanks so much!

By the way, will this go to the record last modified by
me or by anyone in a multi-user?

Bill
-----Original Message-----
Hi,


use the bookmark LastModified:


Me.Bookmark = Me.RecordsetClone.LastModified


Hoping it may help,
Vanderghast, Access MVP


What is the best way to programmatically navigate to the
most recently created record on a continuous form? I use
random numbering for my Primary Key so that wont work.

I have been setting a DateID value for each record that
defaults to Now() when the record is created then I look
for DMax("[DateID]",MyTable) to find it.

I am not sure how well this will work in multiuser
though. When I ask to go to the most recent record there
will it go to the one i've created or the one most
recently created by anyone?

Any elegant workarounds on this? I am guessing there is
something built-in somehwhere i dont know about.


.
 
M

Michel Walsh

Hi,

The property belongs to a recordset object, so, to "you", only, since
the recordset lives in memory of your PC and memory is not shared.


Hoping it may help,
Vanderghast, Access MVP


Bill Mitchell said:
Thanks so much!

By the way, will this go to the record last modified by
me or by anyone in a multi-user?

Bill
-----Original Message-----
Hi,


use the bookmark LastModified:


Me.Bookmark = Me.RecordsetClone.LastModified


Hoping it may help,
Vanderghast, Access MVP


What is the best way to programmatically navigate to the
most recently created record on a continuous form? I use
random numbering for my Primary Key so that wont work.

I have been setting a DateID value for each record that
defaults to Now() when the record is created then I look
for DMax("[DateID]",MyTable) to find it.

I am not sure how well this will work in multiuser
though. When I ask to go to the most recent record there
will it go to the one i've created or the one most
recently created by anyone?

Any elegant workarounds on this? I am guessing there is
something built-in somehwhere i dont know about.


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top