Deleting a record and returning to first record

tlc1974

Registered User.
Local time
Today, 20:29
Joined
Aug 4, 2003
Messages
21
I have a form containing hundreds of records and if I delete record number 50 I don't want to return to the first record on the form. Does anyone know how I can force the form to stay not go to the first record.

Thanks in advance.
 
do you mean the first field on your form? :confused:
 
You must be requerying the form. That will make the record pointer move back to the first record. You should not need to requery after you delete.
 
Requery

I need to requery as the form has number of records displayed etc.
 
Re: Requery

tlc1974 said:
I need to requery as the form has number of records displayed etc.

Where? On/In a "home-made" control?
 
The form has a field which on current of the form counts the number of records and displays this instead of using the access form counter and navigation.
 
In the event procedure whereby you delete the record you add this line before the End Sub.

Code:
Call Form_Current
 
Thanks for that - I have just tried that and as I have my own delete button with code behind it I can get the form to delete the record and stay on the same record but the recordcount field I have doesn't update and when I move through the records I eventually come to one that has all fileds displaying deleted, because it hasn't been refreshed/requeried. If I do refresh/requery though it will return me to the first record on the form.
 

Users who are viewing this thread

Back
Top Bottom