Set Focus to last record

=TB=

Registered User.
Local time
Today, 16:36
Joined
Aug 13, 2002
Messages
68
I have a customers form that opens (datasheet view) allowing a user to choose a customer - on this form there is a button to add a new customer via a another pop up form. When this (add new) pop up form closes, it requerys the customer form, showing the new customer in the list, which is fine but I want to set focus in the customer form to record that has just been added (last new record).

Tried allsorts of ways of doing this but none seem to work, can anyone point me in the correct direction.

Thanks in advance.
 
Does this work?:
DoCmd.RunCommand acCmdRecordsGoToLast
 
What you will need is:

1. A Unique Item to search (Such as the Unique ID of your Customer, which should be in the RecordSet of your DataSheet but does not need to be visible)

2. You will then need a RecordSetClone of the DataSheet

3. Then the Use of the FindFirst and BookMark.

4. This Knowledgebase article ACC2000: Using Code to Dynamically Synchronize Two Forms
 
Thanks for all the help, I was hoping there would be a simplier method as all I want to do is set focus to the last record an event that only happens once. Will keep playing.
 

Users who are viewing this thread

Back
Top Bottom