[Originally posted by jack]

I have this code which is supposed to filter on two fields in a recordset, but only runs when I remove one of the criteria!! any help greatly appreciated

Dim objrs
Dim strCriteria
Dim strresort
Dim strdate
Dim strdatecriteria

Set objrs = Server.CreateObject("ADODB.Recordset")
objrs.Open "qrycc_main", objConn, adOpenForwardOnly, adLockOptimistic, adCmdTable

strresort = Request.Form("dropresort")
strdate = Request.Form("dropmonth")

  strCriteria = "resort='" & strresort & "'"
  strdatecriteria = "monthyear='" & strdate & "'"
'If strresort = "AllResorts" Then
'strCriteria = ""
'End If

  objrs.filter = strdatecriteria AND strCriteria