requerying a control on a sub-form

G

Guest

I am trying to have the combobox: Region, to requery after update the
combobox CountryName in a subform that is bound to the TabCtl23 (tabcontrol)
on the main form. I think I have used all diffenrent kinds of combinations
for the the following syntax, but it does not work. Please help.

Private Sub Region_AfterUpdate()
[TabCtl23]![subfrmProcountry]!CountryName.Requery
End Sub

Thanks in advance.
Niels
 
J

John Vinson

I am trying to have the combobox: Region, to requery after update the
combobox CountryName in a subform that is bound to the TabCtl23 (tabcontrol)
on the main form. I think I have used all diffenrent kinds of combinations
for the the following syntax, but it does not work. Please help.

Private Sub Region_AfterUpdate()
[TabCtl23]![subfrmProcountry]!CountryName.Requery
End Sub

Thanks in advance.
Niels

The tab control is COMPLETELY IRRELEVANT. It is not used in
referencing controls.

If the Name property of the subform is sbfrmProcountry (that is, the
name of the *box*, not the name of the form within that box) use

Me!sbfrmProcountry.Form!CountryName.Requery

The .Form! is supposedly optional but I find it helpful, at least in
understanding the code.

John W. Vinson[MVP]
 

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