Navigating to NEWEST RECORD

  • Thread starter Thread starter Bill Mitchell
  • Start date Start date
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.
 
Hi,


use the bookmark LastModified:


Me.Bookmark = Me.RecordsetClone.LastModified


Hoping it may help,
Vanderghast, Access MVP
 
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.


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


.
 
Back
Top