Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Record Focus in a continuous form

Status
Not open for further replies.

stephenk1973

Technical User
Jun 11, 2003
246
GB
I have a continuous sub form that filters the data shown using the parent-child properties. When changing the parameters, the sub form updates but the focus remains on the same record number and the sub form displays half way down the page. If new data set has fewer rows the sub form will focus on the last record.

Is there a way to force the focus on to the first row? I do not want to use ‘Requery’ as this slows the application down.

Thanks

Stephen
 
Try this in the subform after update event ...

Private Sub Form_AfterUpdate()
DoCmd.GoToRecord acDataForm, , acFirst
End Sub

Tiny

Perfection is Everything
If it worked first time we wont be here!
 
When this is attached an object name is requested.

DoCmd.GoToRecord acDataForm, Forms.Parent.SubForm.Form, acFirst

After introducing the object name the form says the 'object does not support this propert or method'??? Funny thing is if you create a button to complete this in the sub form it works (without the object name). Any ideas?

Thanks

Stephen



 
Have managed to get the effect i want with.....

Subform.Form.Recordset.MoveFirst

Thanks for all help and suggestions.

Stephen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top