where clause

  • Thread starter Thread starter Sam
  • Start date Start date
S

Sam

I am trying to view records where the date value of one control equals that
of another. The following clause causes an error:

WHERE DateValue([TimeStart])=DateValue([DateAppointment]);

How can I modify this to work properly?
Thanks
Sam
 
I am trying to view records where the date value of one control equals that
of another. The following clause causes an error:

WHERE DateValue([TimeStart])=DateValue([DateAppointment]);

How can I modify this to work properly?
Thanks
Sam

For one thing, Queries reference fields in tables, unless you have a full
Forms!FormName!Controlname reference to refer to a control on a form; for
another, DateValue() will give an error if its argument is NULL.

What's the context? Are TimeStart and DateAppointment fields in your table,
controls on a form, or one of each? Might either be NULL?
 
When suggesting there is an error, always provide the error and/or results.

Why are you mentioning "control"? Are TimeStart and DateAppointment both
date values? Are either of them Null?
 
Back
Top