From: TL on
I have a main form whose source is the "Equipment" table with a "LOTOGroup"
combo box on it. The drop-down selections for the "LOTOGroup" combobox are
created when I open a secondary form "LOTOGroup-Add" whose source is the
"LOTOGroups" table. This secondary form is opened from the main form using a
control button and closed using a control button. Both tables are linked
(LOTOGroups field (LOTO Table) one-to-many LOTOGroup field (Equipment
table)). Question - How do I get the "LOTOGroup" combobox on the main form
to update once I open and enter data in the "LOTOGroup-Add" form? I can get
it to initially update by placing a docmd.requery in certain sections of
either form, but after trying to add data a 2nd time is does not update,
unless i close the main form and re-open.
From: Duane Hookom on
If I understand correctly, you need to requery the combo box on the main form
in the after update event of the secondary form.
--
Duane Hookom
Microsoft Access MVP


"TL" wrote:

> I have a main form whose source is the "Equipment" table with a "LOTOGroup"
> combo box on it. The drop-down selections for the "LOTOGroup" combobox are
> created when I open a secondary form "LOTOGroup-Add" whose source is the
> "LOTOGroups" table. This secondary form is opened from the main form using a
> control button and closed using a control button. Both tables are linked
> (LOTOGroups field (LOTO Table) one-to-many LOTOGroup field (Equipment
> table)). Question - How do I get the "LOTOGroup" combobox on the main form
> to update once I open and enter data in the "LOTOGroup-Add" form? I can get
> it to initially update by placing a docmd.requery in certain sections of
> either form, but after trying to add data a 2nd time is does not update,
> unless i close the main form and re-open.
From: TL on
Yes you are correct.

Note - The LOTOGroup combo box (LOTOGroup Field from Equipment table) on the
main form is set-up to retrieve its data from the secondary forms LOTOGroups
field from the LOTO table).

"Duane Hookom" wrote:

> If I understand correctly, you need to requery the combo box on the main form
> in the after update event of the secondary form.
> --
> Duane Hookom
> Microsoft Access MVP
>
>
> "TL" wrote:
>
> > I have a main form whose source is the "Equipment" table with a "LOTOGroup"
> > combo box on it. The drop-down selections for the "LOTOGroup" combobox are
> > created when I open a secondary form "LOTOGroup-Add" whose source is the
> > "LOTOGroups" table. This secondary form is opened from the main form using a
> > control button and closed using a control button. Both tables are linked
> > (LOTOGroups field (LOTO Table) one-to-many LOTOGroup field (Equipment
> > table)). Question - How do I get the "LOTOGroup" combobox on the main form
> > to update once I open and enter data in the "LOTOGroup-Add" form? I can get
> > it to initially update by placing a docmd.requery in certain sections of
> > either form, but after trying to add data a 2nd time is does not update,
> > unless i close the main form and re-open.
From: TL on
Would anyone be able to provide the code to requery the combo box on the main
form secondary form?

"TL" wrote:

> Yes you are correct.
>
> Note - The LOTOGroup combo box (LOTOGroup Field from Equipment table) on the
> main form is set-up to retrieve its data from the secondary forms LOTOGroups
> field from the LOTO table).
>
> "Duane Hookom" wrote:
>
> > If I understand correctly, you need to requery the combo box on the main form
> > in the after update event of the secondary form.
> > --
> > Duane Hookom
> > Microsoft Access MVP
> >
> >
> > "TL" wrote:
> >
> > > I have a main form whose source is the "Equipment" table with a "LOTOGroup"
> > > combo box on it. The drop-down selections for the "LOTOGroup" combobox are
> > > created when I open a secondary form "LOTOGroup-Add" whose source is the
> > > "LOTOGroups" table. This secondary form is opened from the main form using a
> > > control button and closed using a control button. Both tables are linked
> > > (LOTOGroups field (LOTO Table) one-to-many LOTOGroup field (Equipment
> > > table)). Question - How do I get the "LOTOGroup" combobox on the main form
> > > to update once I open and enter data in the "LOTOGroup-Add" form? I can get
> > > it to initially update by placing a docmd.requery in certain sections of
> > > either form, but after trying to add data a 2nd time is does not update,
> > > unless i close the main form and re-open.