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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Easy Question -- populating one list from another

Status
Not open for further replies.

RLA

Instructor
Feb 22, 2002
22
US
Hi,
I have a form which pulls up a report; a user can limit the query results by Branch (cmbBranch), Referral Category (cmbRefCategory), and Referral Source (cmbRefSrc -- more specific than Referral Category). What I want to do is, if someone selects a Branch, this restricts what appears in cmbRefCategory. If someone selects a Referral Category, this restricts what appears in cmbRefSrc. I've gotten this to work but it doesn't reset -- if I choose one referral category, and then want to choose a different one w/o first running the report, it doesn't work. I have to open the query builder before it works.

I've been using cmbRefCategory and cmbRefSrc to try and figure this out. The cmbRefCategory list is populated by a query (qryLookupRefCategory) and works fine. In the Row Source Property of the Referral Source combo box, I have

SELECT [qryLookupRefSrc].[referral_source_id], [qryLookupRefSrc].[referral_source], [qryLookupRefSrc].[referral_category_id] FROM qryLookupRefSrc WHERE ((([qryLookupRefSrc].[referral_category_id]) Like [Forms]![frmRefSrc]!cmbRefCategory));

This works but, as I said above, it doesn't reset. Please help, and thanks very much!
 
Try putting Me.Requery on the on click even of your combo boxes.

:)WB
 
Thanks for the help, but it still doesn't work. The list will reset if I put Me.Requery in the 'on click' but only if I actually select a record, which is from the previous list. I would like the list to update when I select something from the list above w/o having to select a record from the list below.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top