View Full Version : Record Pointer Problems


819 Ag
03-18-2002, 01:28 PM
Friends,

I have a form based on an append query (the append query is based on a find unmatched query). I run the queries and then I requery the form and the focus moves to the first record in the form. I do not want it to do this.

In this form a have two fields: PanelID and TimeOut. PanelID is brought over from another table and the user populates the TimeOut field with a button click.

The queries are only bringing over the new records which is good, but I need to have the record pointer left on the last record that was populated with a time stamp.

This is crucial because I can't have this function go back to the first record every time because it would change the time stamp in my time field.

Is there any way to keep the pointer at the last record that was populated with a time stamp in the form?

Thanks again.

Alexandre
03-18-2002, 02:00 PM
See if the Bookmark will help

Alex

819 Ag
03-18-2002, 02:19 PM
What is Bookmark?

Alexandre
03-18-2002, 02:36 PM
It Returns an unique identifier for each record in a recordset. See the help topic on Bookmark.

ex:
Dim rs As Object

Set rs = Me.RecordsetClone
rs.MoveLast
Me.Bookmark = rs.Bookmark
set rs= Nothing

Alex

[This message has been edited by Alexandre (edited 03-18-2002).]

819 Ag
03-19-2002, 10:30 AM
Alexandre,

Where do I put this code? Is the code above generic or will it work with my database?

I am so completely lost right now on how to implement the advice you are giving me. I think it is exactly what I am looking for, but I don't know where to begin.

If I append records 1-10 to a new table, but I only time stamp through record 4, will the current record be record 4 if I use the bookmark property? The bookmark has to be the last record which was given a time stamp.

Then, I run the append query and add records 10-20. The current record needs to be record 4.

I will give you any table names, field names, primary keys, etc. that you need to get this specific to my database.

Please help.