Avatar of thenemesiz
thenemesiz
Flag for Kenya asked on

ADO SELECT WHERE Date Between

I am getting a 'Syntax error in date in query expression' for the following SELECT stmt:

strSQL = "SELECT * FROM Tiko WHERE T_Date BETWEEN #"
strSQL = strSQL & dtStart & "# and #"
strSQL = strSQL & dtEnd & "# ORDER BY T_Date"

dtStart = Date & " 00:00:00 AM"
dtEnd = Date & " 11:59:99 PM"

Please help!!
thanx


Microsoft AccessSQL

Avatar of undefined
Last Comment
thenemesiz

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
gozoliet

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Dale Fye

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
thenemesiz

ASKER
so, it was that **11:59:59 PM** all along...thanks gozoliet

...both solutions work!

thanks
Dale Fye

If both solutions work, I have no objection to your reopening the question and splitting the points.
thenemesiz

ASKER
modus_in_rebus,

sorry about the points...am new here. How do I reopen the question?
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck