Dr_Michael
August 24th, 1999, 06:12 AM
I have two dtpicker controls where the user selects 2 dates: "from" and "to".
Then I have a database where I want to select all dates between this space:
Dates >= "from" and <= "to"
How may I syntax the SQL command?
Is this right?:
dim strSQL_WHERE as string
strSQL_WHERE = " P_FLD4 <= " & Format$(CStr(frmMain.DTPicker2.Value), "yyyy-mm-dd") & " AND P_FLD4 >= " & Format$(CStr(frmMain.DTPicker1.Value), "yyyy-mm-dd")
Then I have a database where I want to select all dates between this space:
Dates >= "from" and <= "to"
How may I syntax the SQL command?
Is this right?:
dim strSQL_WHERE as string
strSQL_WHERE = " P_FLD4 <= " & Format$(CStr(frmMain.DTPicker2.Value), "yyyy-mm-dd") & " AND P_FLD4 >= " & Format$(CStr(frmMain.DTPicker1.Value), "yyyy-mm-dd")