set parameters on selection from combo box

C

CALVIN

I have to following code set up, which allows me to do
cross-searching on six combo boxes. One of them being
the COMBODATE, which I want to set parameters on. It is
a text field containing the months of a year (Jan...Dec)
and quarters (1st Quarter...4th Quarter). I want to set
parameters so that when I select "1st Quarter", Jan, Feb
and March will also be included in the result. Any kind
of help will be appreciated.

'Dim strFilter As String

'If IsNull(Me.combomake) = False Then
'strFilter = strFilter & "carmake = [forms]!
[Fcar_outputscreen]![combomake] And "
'End If

'If IsNull(Me.combomodelyear) = False Then
'strFilter = strFilter & "caryear = [forms]!
[Fcar_outputscreen]![combomodelyear] And "
'End If

'If IsNull(Me.combostatus) = False Then
'strFilter = strFilter & "carstatus = [forms]!
[Fcar_outputscreen]![combostatus] And "
'End If

'If IsNull(Me.combodate) = False Then
'strFilter = strFilter & "carlaunchquarter = [forms]!
[Fcar_outputscreen]![combodate] And "
'End If

'If IsNull(Me.comboyear) = False Then
'strFilter = strFilter & "carlaunchyear = [forms]!
[Fcar_outputscreen]![comboyear] And "
'End If

'If IsNull(Me.combosegment) = False Then
'strFilter = strFilter & "carsegment = [forms]!
[Fcar_outputscreen]![combosegment] And "
'End If

'If Len(strFilter) > 0 Then
' strFilter = Left(strFilter, Len(strFilter) - 5)
'End If

'If Len(strFilter) > 0 Then
' DoCmd.OpenForm "Fcar_outputscreen", , , strFilter
'End If
 
C

CALVIN

Any help will be appreciated.
-----Original Message-----
Anyone?
-----Original Message-----
I have to following code set up, which allows me to do
cross-searching on six combo boxes. One of them being
the COMBODATE, which I want to set parameters on. It is
a text field containing the months of a year (Jan...Dec)
and quarters (1st Quarter...4th Quarter). I want to set
parameters so that when I select "1st Quarter", Jan, Feb
and March will also be included in the result. Any kind
of help will be appreciated.

'Dim strFilter As String

'If IsNull(Me.combomake) = False Then
'strFilter = strFilter & "carmake = [forms]!
[Fcar_outputscreen]![combomake] And "
'End If

'If IsNull(Me.combomodelyear) = False Then
'strFilter = strFilter & "caryear = [forms]!
[Fcar_outputscreen]![combomodelyear] And "
'End If

'If IsNull(Me.combostatus) = False Then
'strFilter = strFilter & "carstatus = [forms]!
[Fcar_outputscreen]![combostatus] And "
'End If

'If IsNull(Me.combodate) = False Then
'strFilter = strFilter & "carlaunchquarter = [forms]!
[Fcar_outputscreen]![combodate] And "
'End If

'If IsNull(Me.comboyear) = False Then
'strFilter = strFilter & "carlaunchyear = [forms]!
[Fcar_outputscreen]![comboyear] And "
'End If

'If IsNull(Me.combosegment) = False Then
'strFilter = strFilter & "carsegment = [forms]!
[Fcar_outputscreen]![combosegment] And "
'End If

'If Len(strFilter) > 0 Then
' strFilter = Left(strFilter, Len(strFilter) - 5)
'End If

'If Len(strFilter) > 0 Then
' DoCmd.OpenForm "Fcar_outputscreen", , , strFilter
'End If
.
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top