where clause

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
 
J

John W. Vinson

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?
 
D

Duane Hookom

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top