I currently have a form that contains a combo box. I use this combo box to
select certain criteria for a subform. In the subform I have another combo
box, which I would like to be requeried based on the selection in the combo
box on the main form. I have tried using the following code in the after
update event for the combo box on the main form:
Me.[ComboBox2].Requery
It, however keeps giving me an error that it cannot find the field specified.
On the subform I use the code Me.[ComboBox3].Requery in the after update
event of combobox2 and it works ok.
Any suggestions would be appreciated.
Thank you
scubadiver - 14 Sep 2007 14:58 GMT
Try
[forms]![form name]![field name].form[combobox2].requery
replacing "form name" and "field name"

Signature
"Loose Change 2nd Edition" has been seen by almost 7 million people on
Google video
> I currently have a form that contains a combo box. I use this combo box to
> select certain criteria for a subform. In the subform I have another combo
[quoted text clipped - 11 lines]
> Any suggestions would be appreciated.
> Thank you
accessuser1308 - 17 Sep 2007 13:50 GMT
Thank you, this worked as I wanted.
> Try
>
[quoted text clipped - 17 lines]
> > Any suggestions would be appreciated.
> > Thank you
Douglas J. Steele - 14 Sep 2007 14:59 GMT
What's the rest of the code in the event?
Does the error message indicate the actual field which it cannot find? If
so, where is that field: on the same form or on a different form?

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
>I currently have a form that contains a combo box. I use this combo box to
> select certain criteria for a subform. In the subform I have another
[quoted text clipped - 14 lines]
> Any suggestions would be appreciated.
> Thank you
Bob Quintal - 14 Sep 2007 23:14 GMT
=?Utf-8?B?YWNjZXNzdXNlcjEzMDg=?=
> I currently have a form that contains a combo box. I use this
> combo box to select certain criteria for a subform. In the
[quoted text clipped - 13 lines]
> Any suggestions would be appreciated.
> Thank you
Since the combobox is on the subform, you have to specify the
hiearchy of the form (me! is the shortcut)
The subform control's name,(???)
the form in that subform coontrol, (form is the property)
then the name of the field.
so try
Me![child1].form![Combobox2].requery
I don't know the name that you are using for the control, but if you
created it by drag and drop from the toolbox, it'll be child plus a
number. If you created it with the wizard, it may be the name of the
form you put in the subform control. Either way, it's in the
control's name property.

Signature
Bob Quintal
PA is y I've altered my email address.
--
Posted via a free Usenet account from http://www.teranews.com