I have a combo that contains 10 selection, let say 1,2,3,4,5,6,7,10. If I select 1, it will display another set of selection..like 1a,1b,1c....etc. Once I select 1a it will open my report form.
Is this possible?
I have a combo that contains 10 selection, let say 1,2,3,4,5,6,7,10. If I select 1, it will display another set of selection..like 1a,1b,1c....etc. Once I select 1a it will open my report form.
Is this possible?
Presumably you mean with a second combo. If so, the concept is called cascading combos:
Baldy-Cascading Combos
If you want to open a form/report restricted to that chosen value:
BaldyWeb wherecondition
Hi pbaldy,
Instead of two combo box, I was thingking using just only one combo box (see attached graphic) but I dont know how. Is this possible in ms access?
You could do that with a menu; not sure about a combo.
Noted, I was trying to create a third cascading combo box but I'm unable to pull it through. Would appreciate if you could show me the codes for the third combo box (ie. cboSubcity).
thanks
It would be basically the same. What have you got that isn't working?
Below is my code, I'm sure I'm not doing it right. My 3rd combo is cboSubUnit...help.
Code:Private Sub cboSection_AfterUpdate() Dim strSelect As String strSelect = "SELECT Unit, SubUnit" & _ "FROM tblCompany" & _ "WHERE Section = '" & Me.cboSection & "' ORDER BY Unit, SubUnit" Me.cboUnit.RowSource = strSelect Me.cboUnit = vbNullString End Sub
You haven't said what the problem is, but you appear to have made the fairly common error of failing to include spaces when going from one line to another. Try:
Code:strSelect = "SELECT Unit, SubUnit " & _ "FROM tblCompany " & _ "WHERE Section = '" & Me.cboSection & "' ORDER BY Unit, SubUnit"