Requery combo box on subform

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
 
D

Douglas J. Steele

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:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top