You can't think about it like excel. In essence, data filters in excel are "AND"ed together. In Access, you get one SQL source query and one filter. You have to build the SQL for one or the other. That's why, when I have multiple controls that all will affect the query, I put the VBA for the "SQL build" into a common routine, and have each of the three (for example) call the same module to build the SQL based upon the states of all three controls.
Here's some "air code" on how to do it. You'll have to fix all the names, and make sure that the resulting SQL looks right. I assumed that carline was a text field, and that you were looking for an exact match, os I put single quotes around it. Your mileage may vary.
Code:
Private Sub BuildQuery()
Dim WhereDone As Boolean
Dim strListSQL As String
' the select fields are static
WhereDone = False
strListSQL = "SELECT " & _
"[MyTable].[Field1], " & _
"[MyTable].[Field2], " & _
"[MyTable].[Field3], " & _
"FROM [MyTable] "
If [Forms]![OrderEntry]![YEAR] <> "" THEN
strListSQL = strListSQL & _
"WHERE ( [MyTable].[Year] = " & _
[Forms]![OrderEntry]![YEAR] & " "
WhereDone = True
End If
If [Forms]![OrderEntry]![MONTH] <> "" THEN
If WhereDone Then
strListSQL = strListSQL & " AND "
Else
strListSQL = strListSQL & " WHERE ( "
WhereDone = True
End If
strListSQL = strListSQL & _
"[MyTable].[Month] = " & [Forms]![OrderEntry]![Month] & " "
End If
If [Forms]![OrderEntry]![Carline] <> "" THEN
If WhereDone Then
strListSQL = strListSQL & " AND "
Else
strListSQL = strListSQL & " WHERE ( "
WhereDone = True
End If
strListSQL = strListSQL & _
"[MyTable].[Carline] = '" & [Forms]![OrderEntry]![Carline] & "' "
End If
' close the where if there is one
If WhereDone Then
strListSQL = strListSQL & ") "
End If
' Add the order by clause if desired
' you could also put it in the order by of the form
' strListSQL = strListSQL & _
' "ORDER BY [MyTable].[Field1] "
'
' for testing, show sql
' MsgBox strListSQL
' assign the SQL to the required place
Me.RecordSource = strlistSQL
' run sql
Me.Requery
End Sub