field not updating

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

Guest

I finally have the info below working, however after my 2nd combo box gives
me the user names and I make a selection, the selected name will not populate
in my table but the rest of the data does. The first combo box populates as
well. The problem seems to be isolated to the 2nd box.

What am I doing wrong?

thanks again for the assistance!



Second, to answer your question, add a WHERE condition to the RowSource of
your second combo to include only records where clinic_no matches the first
combo:
... WHERE clinic_no=[Forms]![your form name]![cboClinic]

Then, in the AfterUpdate event for cboClinic, requery the second combo:
cboUser.Requery

Note that the bound column of cboClinic should be the Clinic_No, not
Clinic_Name.
 
nevermind....I was being dumb. My mistake.
sorry.

tag said:
I finally have the info below working, however after my 2nd combo box gives
me the user names and I make a selection, the selected name will not populate
in my table but the rest of the data does. The first combo box populates as
well. The problem seems to be isolated to the 2nd box.

What am I doing wrong?

thanks again for the assistance!



Second, to answer your question, add a WHERE condition to the RowSource of
your second combo to include only records where clinic_no matches the first
combo:
... WHERE clinic_no=[Forms]![your form name]![cboClinic]

Then, in the AfterUpdate event for cboClinic, requery the second combo:
cboUser.Requery

Note that the bound column of cboClinic should be the Clinic_No, not
Clinic_Name.

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand


tag said:
I have 1 form called frm_InHouse with 2 combo boxes. There are 2 tables:
clinics and users. tbl_clinics contains clinic, clinic_no and tbl_users
contains clinic_no, clinic, and user. The 2 combo boxes are named
Clinic_Name and User_Name respectively.
When I select a clinic in Clinic_Name (combo box) I'd like a list of users
for that clinic to appear in the 2nd combo box called User_Name.
Is there a simple way to do this?

thanks in advance!!
 
Back
Top