To get proper values from MS Acces database, you need take dates between
#
"SELECT PDATE, plan, [NAME], PQNTY from purch" & vbcr & _
"WHERE pdate>=#" & DTPicker1.Value & "# and pdate <= #" & DTPicker2.Value & "#" & vbcr & _
"ORDER BY [name], pdate"
BTW: Name is reserved word in MS Access, so... to use it you need to take it in a brackets
[]
To get proper values from MS SQL Server, you need take dates between
'
"SELECT PDATE, plan, [NAME], PQNTY from purch" & vbcr & _
"WHERE pdate>='" & DTPicker1.Value & "' and pdate <= '" & DTPicker2.Value & "'" & vbcr & _
"ORDER BY [name], pdate"
I would suggest you to use
BETWEEN ... AND ...[
^] statement.
More about filtering data in MS Access database:
Examples of query criteria[
^]
I almost forgot...
In MS Access database queries dates must be formated as
MM/dd/yyyy
(US format).