expression

  • Thread starter Thread starter lori
  • Start date Start date
L

lori

I need help, I need help writing an expression that will
prompt the user for a date and also a start time and end
time. The field that has this information stores both
date and time. I'm not a wiz by any means but sure would
like to know this one! I can't find it anywhere in the
helps, at least not time's. Any help would be appreciated
 
I can't split the field, it's programmed that way. It's a
field that displays entrydate its a Date/Time date field
and it displays like this
6/18/2003 8:45:09 AM, I did what you said, in my criteria
line of my query I put this
"Where Date"=[enter date] And "starttime"=[enter start
time] And "endtime"=[enter end time], it didn't return
any results, is there something I'm missing?
-----Original Message-----
First of all, you may want to split the field that
contains both date & time so that you have separate fields
for date, start time and end time. Then when you are
writing the query, it could look something like this:

Select blah, blah, blah
From TableA
Where Date = [Enter Date] AND StartTime = [Enter Start
Time] AND EndTime = [Enter End Time];

The text in the brackets [ ] would be displayed as your
prompt message to the user when the query is run.

If you do not split up the field, I think you are going to
encounter all kinds of problems with users entering the
information in different ways, and then forcing you to
handle it correctly.
Hope this helps.
-----Original Message-----
I need help, I need help writing an expression that will
prompt the user for a date and also a start time and end
time. The field that has this information stores both
date and time. I'm not a wiz by any means but sure would
like to know this one! I can't find it anywhere in the
helps, at least not time's. Any help would be appreciated
.
.
 
I need help, I need help writing an expression that will
prompt the user for a date and also a start time and end
time. The field that has this information stores both
date and time. I'm not a wiz by any means but sure would
like to know this one! I can't find it anywhere in the
helps, at least not time's. Any help would be appreciated

Try combining the date and time from the user response. A Date/Time
variable is stored as a Double Float count of days and fractions of a
day, so if you just numerically add a pure date to a pure time you'll
get a date/time.

Here's a suggestion: on your date/time field use a criterion of

BETWEEN (DateValue([Enter date:]) + TimeValue([Enter start time:]))
AND (DateValue([Enter date:]) + TimeValue([Enter end time:]))
 
Back
Top