i believe you can, by creating a string variable with the SQL Query statement in it, and appending the date variables to it.
IE
dim strSQL as string
dim begindate as string
dim enddate as string
strSQL = "SELECT table1.* FROM table1 WHERE table1.begindate = "
strSQL = strSQL & begindate & " AND table1.enddate = "
strSQL = strSQL & enddate & " ; "
see what im getting at?? hope that helps