Can someone tell me why I get a syntax error when I step through this code?:
If Not IsNull(cmbBeginningZone) Then
If Not IsNull(cmbEndingZone) Then
strCriteria = strCriteria & "[tbl_Customer].ZoneID] >= "
strCriteria = strCriteria & cmbBeginningZone & " AND <= "
strCriteria = strCriteria & cmbEndingZone
Else
strCriteria = strCriteria & "[tbl_Customer].[ZoneID] = "
strCriteria = strCriteria & cmbBeginningZone
End If
End If
The query that gets plugged into my openreport method looks like this:
"[tbl_Customer].ZoneID] >= 1 AND <= 6"
Why shouldn't that work?
Thanks in advance!
Chris
If Not IsNull(cmbBeginningZone) Then
If Not IsNull(cmbEndingZone) Then
strCriteria = strCriteria & "[tbl_Customer].ZoneID] >= "
strCriteria = strCriteria & cmbBeginningZone & " AND <= "
strCriteria = strCriteria & cmbEndingZone
Else
strCriteria = strCriteria & "[tbl_Customer].[ZoneID] = "
strCriteria = strCriteria & cmbBeginningZone
End If
End If
The query that gets plugged into my openreport method looks like this:
"[tbl_Customer].ZoneID] >= 1 AND <= 6"
Why shouldn't that work?
Thanks in advance!
Chris