R
Ray
I have two forms (Form1 and Form2)> Form1 has 7
comboboxes and I want to open Form2 using any combination
of the comboboxes. The problem is that if any one of the
comboboxes has not been selected and its current value is
therefore "null", then I get a syntax error. Is there any
default value that I can assign to the comboboxes which
would be interpreted as meaning "no filter for this
column"? My Code is as follows. The individual parts work
fine. But, put them all together, like below, and leave
one combobox unselected and I get error messages
stLinkCriteria = "[Date]>" & "#" & Me![StartDate] & "#" _
& "And" & "[Date]<" & "#" & Me![EndDate] & "#" _
& "And" & "[ProducedShift]=" & "'" & Me![Shift] & "'" _
& "And" & "[TLPriKey]=" & Me![TeamLeaders] _
& "And" & "[PONum]=" & Me![PONum] _
& "And" & "[RoutingID]=" & Me![RoutingNum]
comboboxes and I want to open Form2 using any combination
of the comboboxes. The problem is that if any one of the
comboboxes has not been selected and its current value is
therefore "null", then I get a syntax error. Is there any
default value that I can assign to the comboboxes which
would be interpreted as meaning "no filter for this
column"? My Code is as follows. The individual parts work
fine. But, put them all together, like below, and leave
one combobox unselected and I get error messages
stLinkCriteria = "[Date]>" & "#" & Me![StartDate] & "#" _
& "And" & "[Date]<" & "#" & Me![EndDate] & "#" _
& "And" & "[ProducedShift]=" & "'" & Me![Shift] & "'" _
& "And" & "[TLPriKey]=" & Me![TeamLeaders] _
& "And" & "[PONum]=" & Me![PONum] _
& "And" & "[RoutingID]=" & Me![RoutingNum]