B
bobstubbs
Guest
Problem: I can't get a subform's records to be controlled
by buttons on the main form.
I have a form that contains a continuous subform. The subform
does not have the master/child links hooked up so that the
subform is acting like an independant form. That works fine.
I am able to navigation the records in the sub form using the
sub form's navigation bar but I would like to put buttons on the
parent form that navigate that subforms records (first, prev, next, last)
I created a few buttons that go top, next, prev, last. I had these
buttons call subroutines inside of the subform to do the navigation.
The subform navigation subroutines were simply
DoCmd.GoToRecord , , acFirst
When I pressed the main form's button to go to the first subform record,
access complained that subform was not able to do this. I tried setting the
focus to this form but that resulted in the same problem. I tried setting
the active object with
DoCmd.SelectObject ,, "SubFormName"
but it couldn't find the sub form.
I was able to create navigation buttons on the footer of the sub form
and that worked fine.
Any help would be greatly appreciated and thanks in advance
Bob Stubbs
stubbs@mscsoftware.com
by buttons on the main form.
I have a form that contains a continuous subform. The subform
does not have the master/child links hooked up so that the
subform is acting like an independant form. That works fine.
I am able to navigation the records in the sub form using the
sub form's navigation bar but I would like to put buttons on the
parent form that navigate that subforms records (first, prev, next, last)
I created a few buttons that go top, next, prev, last. I had these
buttons call subroutines inside of the subform to do the navigation.
The subform navigation subroutines were simply
DoCmd.GoToRecord , , acFirst
When I pressed the main form's button to go to the first subform record,
access complained that subform was not able to do this. I tried setting the
focus to this form but that resulted in the same problem. I tried setting
the active object with
DoCmd.SelectObject ,, "SubFormName"
but it couldn't find the sub form.
I was able to create navigation buttons on the footer of the sub form
and that worked fine.
Any help would be greatly appreciated and thanks in advance
Bob Stubbs
stubbs@mscsoftware.com