Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cascading Combo Boxes: Only for unbound forms? 2

Status
Not open for further replies.

PamelaD

Technical User
Joined
Feb 15, 2001
Messages
12
Location
US
From what I've read (KB97624 and KB98660)at the instructions to synchronize combo boxes call for putting two unbound combo boxes on unbound form.

I'm trying to put a pair of synchronized combo boxes on a bound form. I'm having no success with this and wonder if it is only possible to do this on an unbound form. I've spent the better part of the day trying to make this work out, so before I throw alot more time into it, I am hoping that someone can answer this for me. Thanks in advance.
 
Certainly you can use as many commbo boxes on a bound form as you wish.

If you wish to change the Data Source of one box from information on the other, you can do that. If you need code tell a bit about what you wish to do and the structure of your tables.

Rollie E
 
Perhaps faq702-681 can help.

Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
Thank you both, Rolliee and Rick, for your suggestions/offers of help. I am still slugging away at this, and while I've made progress, I've still not got it right. So I’m wondering if you might be able to see what I’m doing wrong here:

I have tblPersons, fields as follows:

PersonID
NameLast
FirstMiddle
CompanyID (cboCompanySelect) (unbound combo)
CompLocID (cboLocationSelect) (unbound combo)
Position


The row source for cboCompanySelect is tblCompany, which has two fields, CompanyID and CompanyName

The row source for cboLocationSelect is tblLocations, which has four fields, CompLocID, LocationName, City, and CompanyID

For cboLocationsSelect, in the Criteria for CompanyID, I put the following:
IIf(IsNull([Forms]![frmPersons]![cboCompanySelect]),[CompanyID],[Forms]![frmPersons]![cboCompanySelect])

(Rick, I tried to use Forms![frmPersons]![cboCompanySelect].Value and I couldn’t make it work…)

In the AfterUpdate event of cboCompanySelect, I have cboLocationSelect.Requery

What I end up with is this: My cboCompanySelect works correctly to filter the options for cboLocationSelect, BUT, every single record for every single person shows that they work for the same company at the same location. Hmmm...

I would greatly appreciate any insight as to what I'm doing wrong. Thanking you very much in advance...
Kindest regards,
Pamela D.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top