
VBA COntrolled Date Range in SQL Query
Quote:
> I am using the Calendar control (activeX) date picker to
> select my dates. I know that this passes the date and time
> to my text box. I have a format on these text boxes that
> is short date. Do I need more of a format control than
> this?
I don't know whether the Calendar control passes a non-zero time or not;
I haven't used the control, and it doesn't really make sense to me that
a calendar control would pass a time as well as a date. If it does,
though, that could be your problem. The format of the text boxes
controls how they display their contents, but not what the contents
actually are -- if you have a time value in there with the date, that's
what the query will be using.
With the form open, try entering these lines (one at a time, and press
enter after each one) in the Immediate window of the VB Editor
environment to see what's really in those text boxes:
?Forms!specificlogdata!Text41
?Forms!specificlogdata!Text42
That'll tell us whether we're barking up the wrong tree here.
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)