I have a Main form with a combo box which is the id number for that client
and 6 tabs with each one as a subform.
A tab "as" a subform? Sorry, tabs don't work that way. A Tab Control
has NOTHING to do with data or subforms. Its *only* function is to
share screen space. You can put subforms on a tab, or you can put
listboxes or checkboxes or anything else; it's just a way of arranging
controls on the screen.
I'm guessing that you have six Subforms; the fact that they are
located on different pages of a tab control has absolutely no bearing
on record navigation.
Each tab form operates as a
calculator and the info is loaded into separate tables.
I have no idea what you mean by "operates as a calculator".
When you chose an
id out of the combo box, I need the tab subform to load at a new record
without hitting the cmd new button.
Which event would it go?
DoCmd.OpenForm "Forms!frmMaintenance!frmPairOut", acNormal
DoCmd.GoToRecord , , acNewRec
This code has nothing to do with tab controls or with subforms; it
opens a NEW FORM, or it would if you passed it "frmPairOut" as the
first argument.
Does it not have to do with the Change Event?
Nope. The Change Event fires at every keystroke in the combo box.
I *THINK* - and I'm not at all certain - that what you want to do is
have the six Subforms each have the name of the combo box as their
Master Link Field, so that when you select a new record in the combo,
the subforms' record sources reflect that change. At the most, you
might need to use the combo box's AfterUpdate event (which fires when
a new record has been selected) to Requery each subform:
Me!subMySubform1.Form.Requery
where subMySubform1 is the Name property of the subform control (which
might or might not be the same as the name of the form within that
control). The tab page number - and the tab control itself - is
irrelevant to this action.
John W. Vinson[MVP]