Combo boxes

SPDurie

New member
Local time
Today, 13:14
Joined
Oct 28, 2001
Messages
7
I'm not skilled in the ways of VB so I hope the answer involves a query and/or macro.

On my form I have two combo boxes one has a list of offices in my company. The other has 42 categories the company can spend from. The problem is that I would like to limit the choices a person has in the 42 category box based on what they choose from the other drop down box. Please keep in mind that each office has several things to choose from in the second combo box.

So basically I want to base the contents of one combo box on what is entered in the other combo box. So, if someone enters in "LGMW" in the first combo box that should reduce the second combo box from 42 to a few items that's only specific to "LGMW."

I think I make it sound more complicated than it really is.
 
I don't know if I did what those links suggested correctly.

On one, it only listed what was in the query. But it didn't differentiate or list the categories I needed. I'm sure it'd would work if I knew what I was doing. It would list everything!

What am I doing wrong?

Thanks.
 
I can't really troubleshoot what you're doing wrong unless you post your code. But I will tell you how I made a set of cascading combo boxes on one of my forms.

In my form, I have a combobox called payor. Each payor has certain insurance codes that are associated with it. So I wanted a user's choice of insurance codes to be limited by the payor.

1) I have the first combobox, cboPayor. In the row source for that combobox, I have:
SELECT DISTINCTROW insurancecodes.Payor FROM insurancecodes GROUP BY insurancecodes.Payor ORDER BY insurancecodes.Payor;

2) I have a second combobox, cboInscode. The row source for that is:
SELECT DISTINCTROW insurancecodes.Code FROM insurancecodes WHERE (((insurancecodes.Payor) Like [Forms]![frmcalllog]![cbopayor]));

3) In the change event for the first combo, I have:
Me.cboInsCode.Requery
Me.cboInsCode = ""

I also found this article in the MS Knowledge base that deals with this subject using macros. I haven't tried it tho'... http://support.microsoft.com/support/kb/articles/Q98/6/60.ASP?LN=EN-US&SD=gn&FR=0&qry=combobox&rnk=5&src=DHCS_MSPSS_gn_SRCH&SPR=ACC97

If this doesn't help, then post your code...


[This message has been edited by LQ (edited 10-29-2001).]
 

Users who are viewing this thread

Back
Top Bottom