Hi!
i am running the query but it is showing the error of syntax, i m accessing this table from sql server & my query is
squery = "SELECT * FROM New_Rec where From_Date > = " & Format(DTPFrom & " 00:00:00", "dd/mm/yyyy HH:MM:SS AMPM") & " AND To_Date <= " & Format(DTPTo & " 23:59:59", "dd/mm/yyyy HH:MM:SS AMPM") & """"
In this query FROM_DATE and TO_DATE are my column names AND DTPFrom & DTPTo are DTPicter .
best regards
varinder
i am running the query but it is showing the error of syntax, i m accessing this table from sql server & my query is
squery = "SELECT * FROM New_Rec where From_Date > = " & Format(DTPFrom & " 00:00:00", "dd/mm/yyyy HH:MM:SS AMPM") & " AND To_Date <= " & Format(DTPTo & " 23:59:59", "dd/mm/yyyy HH:MM:SS AMPM") & """"
In this query FROM_DATE and TO_DATE are my column names AND DTPFrom & DTPTo are DTPicter .
best regards
varinder
Comment