Combo Box Requering



This should be very simple but I cannot seem to get it to work. I have a
form that has 2 combo boxes. The first one is the supervisor and the second
is the specialist. I want the specialists to change when the supervisor is
changed. I have read and re-read the postings that say to do a Me.Requery in
the After Update event of the driving combo box (In this case - Supervisor).
The supervisor combo box is driven by a query and the specialist combo box is
driven by code on the Row Source. Since I am using both combo box values to
feed other queries, I have moved each to textboxes.
Supervisor is ComboBox 17 and the value goes to textbox 37
Specialist is ComboBox and the value goes to textbox 52

Everything works fine on the first supervisor chosen and I can change the
specialist all day long with no problem. But when I chose a different
supervisor, the specialist values do not update. Why? Ideas?




Rather than using Me.Requery (which requeries the record source
of the form itself), you need to explicitly requery the secondary
combo box in the After Update event of the primary combo box.
For example;

Pivate Sub cboSupervisor_AfterUpdate ()


End Sub

I took the liberty of using more appropriate names for your combo
boxes, something I would recommend you do. If you revisit your
database/code months or years from now, names like ComboBox 17
and TextBox 37 will tell you nothing about the purpose of those



Jeff Boyce

How depends on what -- what data underlies these comboboxes?

What do your queries look like that feed these comboboxes?

What code do you have in the Supervisor_AfterUpdate event procedure?

More info, please...


Jeff Boyce
Microsoft Access MVP

Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or psuedocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer

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

Similar Threads