Using Weekday of calendar control in a query?

  • Thread starter Thread starter Jerome
  • Start date Start date
J

Jerome

Hi,

I need to restrict my query results to the same weekday as the day
currently selected on my calendar control. Meaning if I select a Friday,
the result should be all events happening on a Friday. How do I do this?

I tried this: Weekday([Forms]![fPlanification]![calPlanif]) to get the
numerical value of the weekday in question. But it doesn't work.

calPlanif being of course the calendar control on my form.

Any suggestions?

Thanks!
 
Jerome said:
Hi,

I need to restrict my query results to the same weekday as the day
currently selected on my calendar control. Meaning if I select a Friday,
the result should be all events happening on a Friday. How do I do this?

I tried this: Weekday([Forms]![fPlanification]![calPlanif]) to get the
numerical value of the weekday in question. But it doesn't work.

calPlanif being of course the calendar control on my form.

What happens? Do you get an error? Does the Weekday() function not
return the correct number?

Show your SQL so we can analyze it, test it.
 
Back
Top