Go to a specific record in a subform

JCollins

Registered User.
Local time
Today, 10:27
Joined
Dec 3, 2001
Messages
13
I have a parent form that filters a subform. When I change a cbobox on the parent form, I want the subform to refresh and go to the first record....

I have been trying to use the gotorecord action behind the OnChange event of the cbobox on the parent form, but it is not working...Any thoughts
 
Yes, I want to set focus on the first record.
 
SomeFormName.SetFocus
Forms!SomeFormName!SubFormName.Form!FieldName.SetFocus should work other than that DoCmd. GoToControl, SubFormName
DoCmd. GoToControl, FieldName
you might find it easier to use the maco builder and then convert it to vb
 
Thanks Rich!

This worked PERFRECTLY!

dim ctl as Control

set ctl =......subform name

DoCmd.GoToControl ctl.Name
DoCmd.GoToRecord , , acFirst
 

Users who are viewing this thread

Back
Top Bottom