Requery combo box on subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have and Access 2002 form that contains a subform. The subform is a continous form with a combo box as one of the fields. My issue is that when the user changes a combo box on the main form, I want to requery the combo box on the sub form. I have tried the following syntax in the after_update event of the main form combo box

Forms("frmcasetype").Controls("frmcasetypeservice").servicecombo.Requer

It gives me run-time error 438 Object doesn't support this property or metho

Can someone please help me with the correct syntax

Thanks
 
Assuming that frmcasetypeservice is the name of the control that you've put
the subform in, and that servicecombo is the name of the combo box you're
trying to refresh, try

Forms("frmcasetype").Controls("frmcasetypeservice").Forms!servicecombo.Reque
ry

It's a little confusing at time: you have both a container for your subform,
and the form object that makes up the subform. When you drag a form onto
another form to use it as a subform, Access names the container it creates
the same as the subform, which certainly adds to the confusion.


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Doug said:
I have and Access 2002 form that contains a subform. The subform is a
continous form with a combo box as one of the fields. My issue is that when
the user changes a combo box on the main form, I want to requery the combo
box on the sub form. I have tried the following syntax in the after_update
event of the main form combo box:
 
Back
Top