Afternoon all
I need a quick hand with a couple of combo boxes and would be much obliged if your could help me out
I have am creating a search form where the search type is in 1 combo box (called cboSearch) that calls to a table tblSearchCriteria to get its drop down values – the values are
Impact
Sheet Name
Assigned to
Site
What I want is for my second combo box called cboSearchObjective to populate with different values depending on the value of the first box (cboSearch)
I have tables with the search values in called
tblImpact
tblSite
tblSheets
tblAssigned
ive been playing on with something along the lines of:
Private Sub cboSearch_Click()
If Me.cboSearch = "Impact" Then
Dim strSQL As String
strSQL = "SELECT [TblImpact].[ID], [TblImpact].[Impact] FROM [TblImpact]"
Forms!FrmSearch!cboSearchObjective.RowSource = strSQL
End If
End Sub
(repeated for if cboSearch = Site or if cboSearch = Sheets etc etc)
Obviously trying to change the rowsource of the cboSearchObjective box depending on the value of the cboSearchCriteria box
But have come a cropper
If anyone could shed some light on the situation I would be very grateful
Thanks
Matthew
I need a quick hand with a couple of combo boxes and would be much obliged if your could help me out
I have am creating a search form where the search type is in 1 combo box (called cboSearch) that calls to a table tblSearchCriteria to get its drop down values – the values are
Impact
Sheet Name
Assigned to
Site
What I want is for my second combo box called cboSearchObjective to populate with different values depending on the value of the first box (cboSearch)
I have tables with the search values in called
tblImpact
tblSite
tblSheets
tblAssigned
ive been playing on with something along the lines of:
Private Sub cboSearch_Click()
If Me.cboSearch = "Impact" Then
Dim strSQL As String
strSQL = "SELECT [TblImpact].[ID], [TblImpact].[Impact] FROM [TblImpact]"
Forms!FrmSearch!cboSearchObjective.RowSource = strSQL
End If
End Sub
(repeated for if cboSearch = Site or if cboSearch = Sheets etc etc)
Obviously trying to change the rowsource of the cboSearchObjective box depending on the value of the cboSearchCriteria box
But have come a cropper

If anyone could shed some light on the situation I would be very grateful
Thanks
Matthew