I have a form with 2 subforms. The main form has a combo box
Department. The subforms contain combo boxes with lists dependant upon
the main form's Department choice. How do I requery the lists of the
subform combo boxes?
Private Sub DepartmentOrValueStream_Change()
Me.cboMachineOrWorkcenter.Requery
Me.frmScrap_Subform.cboscrapchar.Requery
Me.frmScrap_Subform.cboscrapdefect.Requery
Me.frmScrap_Subform.cboscrapcause.Requery
Me.tblDownTime_Subform.cboDTCode.Requery
End Sub
The combobox on the main form updates fine but I receive a compile
error whenever I try to update a combo box in either of the subforms.
Any help would be greatly appreciated.
Thanks,
Ted
>I have a form with 2 subforms. The main form has a combo box
> Department. The subforms contain combo boxes with lists dependant upon
[quoted text clipped - 12 lines]
> error whenever I try to update a combo box in either of the subforms.
> Any help would be greatly appreciated.
Try explicitly using the Form property of the subfrom control, for example
...
Me.frmScrap_Subform.Form.cboscrapchar.Requery

Signature
Brendan Reynolds
tecas - 17 May 2007 20:26 GMT
On May 17, 12:55 pm, "Brendan Reynolds"
<brenr...@discussions.microsoft.com> wrote:
> >I have a form with 2 subforms. The main form has a combo box
> > Department. The subforms contain combo boxes with lists dependant upon
[quoted text clipped - 22 lines]
>
> - Show quoted text -
Thanks, works like a charm. My second try was
me.form.frmscrap_subform.cboscrapchar.requery. This, of course works
much better.