M
Mike Revis
Hi Group,
WinXP, Access 2007.
I have a set of 3 cascading combo boxes that all work the way I want. So
far.
cboSelectCategory
cboSelectSubCategory
cboSelectPart
I have run into a situation where some categories do not have sub
categories.
All of the queries return the expected result when run individually.
This is what I have now.
Private Sub cboSelectCategory_AfterUpdate()
Me.cboSelectSubCategory.Visible = True
Forms!frmMainMenu!cboSelectSubCategory.RowSourceType = "Table/Query"
Forms!frmMainMenu!cboSelectSubCategory.RowSource = "qryGetSubCategory"
End Sub
For what I need I think I have the concept but I can't find the words.
Private Sub cboSelectCategory_AfterUpdate()
If **qryGetSubCategory returns no records** then
Me.cboSelectPart.Visible = True
Forms!frmMainMenu!cboSelectPart.RowSourceType = "Table/Query"
Forms!frmMainMenu!cboSelectPart.RowSource = "qryGetPartWithoutSubCategory"
Else
Me.cboSelectSubCategory.Visible = True
Forms!frmMainMenu!cboSelectSubCategory.RowSourceType = "Table/Query"
Forms!frmMainMenu!cboSelectSubCategory.RowSource = "qryGetSubCategory"
End If
End Sub
As always any thoughts, comments or suggestions are welcome.
Best regards,
Mike
WinXP, Access 2007.
I have a set of 3 cascading combo boxes that all work the way I want. So
far.
cboSelectCategory
cboSelectSubCategory
cboSelectPart
I have run into a situation where some categories do not have sub
categories.
All of the queries return the expected result when run individually.
This is what I have now.
Private Sub cboSelectCategory_AfterUpdate()
Me.cboSelectSubCategory.Visible = True
Forms!frmMainMenu!cboSelectSubCategory.RowSourceType = "Table/Query"
Forms!frmMainMenu!cboSelectSubCategory.RowSource = "qryGetSubCategory"
End Sub
For what I need I think I have the concept but I can't find the words.
Private Sub cboSelectCategory_AfterUpdate()
If **qryGetSubCategory returns no records** then
Me.cboSelectPart.Visible = True
Forms!frmMainMenu!cboSelectPart.RowSourceType = "Table/Query"
Forms!frmMainMenu!cboSelectPart.RowSource = "qryGetPartWithoutSubCategory"
Else
Me.cboSelectSubCategory.Visible = True
Forms!frmMainMenu!cboSelectSubCategory.RowSourceType = "Table/Query"
Forms!frmMainMenu!cboSelectSubCategory.RowSource = "qryGetSubCategory"
End If
End Sub
As always any thoughts, comments or suggestions are welcome.
Best regards,
Mike