G
Guest
I have a tabbed page form with for pages on it. The first three allow entry
of data to one table (a primary table) and the last page holds a subform that
was added via Subform wizards (a pre-existing form added as subform). The
subform updates a secondary table to the primary table. Kind of like Order
table and product table.
Anyway, the first three pages of the tabbed form scroll or roll
automatically to the next field by using a command button to "SET CONTROL" to
the next tabbed page, next field location.
Problem is when I try to automatically scroll to the next field position
(the first field on the sub form) it does not work. I get the error that the
control is not on the current form or current table. How do I "SET CONTROL"
to be directed to the subform. I hav even tried to set focus to the first
field on the subform via code, but that doesn't compile correctly either.
the primary form name is FR_CR_E. The sub form name is FR_ADD_OTHERS_E
The first field I would like to position to on the Subform is named
Vehicle_Cde.
Can anyone assist in this issue. I have found in Microsoft Access Help that
you supposedly can not use SET.CONTROL on subforms from forms, that you have
to use SetFocus, but I can not seem to get the code correct. I've tried....
Private Sub Command396_Click()
[Form].[SFr_Add_Others_E].[VEHICLE_CDE].SetFocus
End Sub
and it gives errors. Any clues..??
Thanks in advance
of data to one table (a primary table) and the last page holds a subform that
was added via Subform wizards (a pre-existing form added as subform). The
subform updates a secondary table to the primary table. Kind of like Order
table and product table.
Anyway, the first three pages of the tabbed form scroll or roll
automatically to the next field by using a command button to "SET CONTROL" to
the next tabbed page, next field location.
Problem is when I try to automatically scroll to the next field position
(the first field on the sub form) it does not work. I get the error that the
control is not on the current form or current table. How do I "SET CONTROL"
to be directed to the subform. I hav even tried to set focus to the first
field on the subform via code, but that doesn't compile correctly either.
the primary form name is FR_CR_E. The sub form name is FR_ADD_OTHERS_E
The first field I would like to position to on the Subform is named
Vehicle_Cde.
Can anyone assist in this issue. I have found in Microsoft Access Help that
you supposedly can not use SET.CONTROL on subforms from forms, that you have
to use SetFocus, but I can not seem to get the code correct. I've tried....
Private Sub Command396_Click()
[Form].[SFr_Add_Others_E].[VEHICLE_CDE].SetFocus
End Sub
and it gives errors. Any clues..??
Thanks in advance