Question on Form

E

Eric

Dear all

I've made a form and i would like it to show the last record that user
input.

How can i do that

Eric
 
K

Kardan via AccessMonster.com

Hi Eric

Provided that the last record added is the last record in the forms Control
Source (probably a table?), you can use the following in the forms On Open
event.

DoCmd.GoToRecord , , acLast

Hope this helps.

Richard
 
R

Ron2006

I believe that the suggest instructions will take you to the last
record in the sorted sequence of the query that your form is based on.
If that sequence results indeed in the last record then you have your
answer.

But if the sequence is something else then it will obviously NOT be
the last physical record entered.


IF you have an autonumber field in your table AND include that in your
query AND sort the query by that number then the above will get you to
that record.

Let us know what you are trying to do and somone can offer a different
solution if need be.
 
J

John W. Vinson

Dear all

I've made a form and i would like it to show the last record that user
input.

How can i do that

Eric
Access does not record or care about the order in which records are entered. A
table is an unordered "heap" of data - what you ask is sort of like asking to
see the last potato that was thrown into the bin! Sure, it might be on top
(last in the recordset) but it might have bounced (Access might have had a
vacant spot on disk that needed filling).

If you want to keep track of the order of record entry you need to have a
field in the record which notes that - either a sequential autonumber or a
date/time field with a default value of Now(). If there are multiple users
updating concurrently and you want to go back to the last record that *this
user* entered you will also need to record the user's identity.
 

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