Your immediate problem was the lack of # date separators, as @MicSim showed you. However, I suggest you consider a different approach for your WHERE clause.
The WHERE clause after adding # delimiters looks like this (with today's date).
Debug.Print "WHERE pdate not between #1-" & _
Format$(Now, "MMM") & "-" & Format$(Now, "YYYY") & _
"# and #20-" & Format$(Now, "MMM") & "-" & _
Format$(Now, "YYYY") & "#"
WHERE pdate not between
, pdate . ( / .) , , - , pdate 20.05.2011 10:18:15 AM? WHERE . 20 ... , ?
, WHERE.
Debug.Print "WHERE pdate < " & _
Format(DateSerial(Year(Date), Month(Date), 1), "\#yyyy-mm-dd#\") & _
" OR pdate >= " & _
Format(DateSerial(Year(Date), Month(Date), 21), "\
WHERE pdate <
vb6. DateSerial(), Year(), Month(), Date() Format() . (. Microsoft ).
. @Brian Camire .
Debug.Print "WHERE pdate < " & _
"DateSerial(Year(Date), Month(Date), 1)" & _
" OR pdate >= " & _
"DateSerial(Year(Date), Month(Date), 21)"