Unable to change a selection in a combo box -- Requery?

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

Guest

I am having what I think is a “requery†problem with some combo boxes. Here’s
the setup.

In the first combo box (cboState), the user selects a state. In the second
combo box (cboSourceName), a filtered list of contacts for that state with
their titles appears. After selecting the desired contact, two other controls
on the form are filled with the contact’s phone and e-mail address.
Everything works fine unless a user selects the wrong contact by mistake. The
cboSourceName will not allow a new selection from the list.

I have the following code in the After Update event of cboState:
Private Sub cboState_AfterUpdate()
cboSourceName.Requery
End Sub

I tried putting a requery in the On Change event of cboSourceName, but that
didn’t work (can a control requery itself?).
Here is the cboSourceName Row Source query.

SELECT qry_Contacts_Data_Entry.StateAbr, qry_Contacts_Data_Entry.FullName,
qry_Contacts_Data_Entry.ContactType, qry_Contacts_Data_Entry.Phone,
qry_Contacts_Data_Entry.Email, FROM qry_Contacts_Data_Entry WHERE
(((qry_Contacts_Data_Entry.StateAbr)=forms!frm_SR_Data_Entry.cboState));

Here is the Row Source value for the [phone and e-mail address controls:
=cboSourceName.Column(3)
=cboSourceName.Column(4)
I know these also need something in an event, as well.

Any help you can provide will be very much appreciated.
 
Folks. I'm replying to my own question so as not to waste anyone's time. In
some way, my "problem" has resolved itself on its own, and I am now able to
change the selection in the 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

Similar Threads


Back
Top