Johnnycat1
Programmer
I have been trying to filter the data in a subform using multiple filters in the main form. Each of the filters work individually as I have written them but my efforts to combine the criteria of the filters has me stumped. The goal is to filter the date in the subform based on multiple combo boxes in the main form. As always your help is very appreciated.
This is the code for each of the two filters:
With Forms![Job # Project Order # Form]![Job # Project Order # SubForm].Form
.Filter = "[Customer]='" & Forms![Job # Project Order # Form]![CustomerName] & "'"
.FilterOn = True
End With
With Forms![Job # Project Order # Form]![Job # Project Order # SubForm].Form
.Filter = "[ClosedProjects]='" & Forms![Job # Project Order # Form]![FilterClosedProject] & "'"
.FilterOn = True
End With
When I combine them as follows, I get a type mismatch.
With Forms![Job # Project Order # Form]![Job # Project Order # SubForm].Form
.Filter = "[Customer]='" & Forms![Job # Project Order # Form]![CustomerName] & "'" And "[ClosedProjects]='" & Forms![Job # Project Order # Form]![FilterClosedProject] & "'"
.FilterOn = True
End With
Any suggestions???
This is the code for each of the two filters:
With Forms![Job # Project Order # Form]![Job # Project Order # SubForm].Form
.Filter = "[Customer]='" & Forms![Job # Project Order # Form]![CustomerName] & "'"
.FilterOn = True
End With
With Forms![Job # Project Order # Form]![Job # Project Order # SubForm].Form
.Filter = "[ClosedProjects]='" & Forms![Job # Project Order # Form]![FilterClosedProject] & "'"
.FilterOn = True
End With
When I combine them as follows, I get a type mismatch.
With Forms![Job # Project Order # Form]![Job # Project Order # SubForm].Form
.Filter = "[Customer]='" & Forms![Job # Project Order # Form]![CustomerName] & "'" And "[ClosedProjects]='" & Forms![Job # Project Order # Form]![FilterClosedProject] & "'"
.FilterOn = True
End With
Any suggestions???