Brandon,
I'm no DB expert, but a couple of thing would simplify your task.
There no point formatting the SQL statement with "& Chr(13) & "" & Chr(10)"
as this is irrelevant to ADO, unless you want it to look nice in the debug
window.
Not sure how ADO would handle the "{" barcket in the SQL, unless they are
required by your DB.
Depending on how the data is held in "Range("A3").Value" you may be
returning an unexpected value to the dtest variable.
Add a Debug.Print dtest and see what is being passed.
To me it seems that the part "{ts '" & dtest & "'}" would evalaute to
something like
{ts '08-Apr-04 8:00:43 PM'}
which is probably not what you are storing in the DB, as the ts variable is
not being evaluated as it is in the string.
If you wish to use the "(" brakets for clarity, it would be better to
contain to two caparions either side of the AND separately.
Hope that helps.
NickHK
"Brandon" <bdreilingATmac.com wrote in message
...
Thanks for your reply.
The two variables will create a date/time range.
={ts '" & dtest & "'} is to state greater or equal to a date and
timestamp, such as 2004-04-07 00:00:00 and the next variable will state
less than or equal to 2004-04-08 00:00:00.
Basically it is scaling down to a 24 hour time frame that will change
each day.
Thanks for your help,
Brandon
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!