Every other monday

J

Jeff

Below is a bit of code from my cross product query that allows me to see
every monday in the given month.
[Monday] is a checkbox on the form, [Iota] is a table with numbers 0-30.
My question: How can I modify this code to show every other Monday?

(Weekday(DateAdd("d",txb_MonthStartDate,[Iota]-1)))=-[Monday]*2
 
G

Gary Walter

Jeff said:
Below is a bit of code from my cross product query that allows me to see
every monday in the given month.
[Monday] is a checkbox on the form, [Iota] is a table with numbers 0-30.
My question: How can I modify this code to show every other Monday?

(Weekday(DateAdd("d",txb_MonthStartDate,[Iota]-1)))=-[Monday]*2
Hi Jeff,

Choose one:

"Every other Monday" can be odd
(or "every other Monday" can be even).

((Weekday(DateAdd("d",txb_MonthStartDate,[Iota]-1)))=-[Monday]*2)
AND
((Day(DateAdd("d",txb_MonthStartDate,[Iota]-1))) MOD 2 = 1)

or

((Weekday(DateAdd("d",txb_MonthStartDate,[Iota]-1)))=-[Monday]*2)
AND
((Day(DateAdd("d",txb_MonthStartDate,[Iota]-1))) MOD 2 = 0)

Good luck,

Gary Walter
 
G

Gary Walter

Plus...you might just be able run MOD
on Iota alone depending on what else
you are doing in query....
or just set up an IotaEven (or IotaOdd) table


Jeff said:
Below is a bit of code from my cross product query that allows me to see
every monday in the given month.
[Monday] is a checkbox on the form, [Iota] is a table with numbers 0-30.
My question: How can I modify this code to show every other Monday?

(Weekday(DateAdd("d",txb_MonthStartDate,[Iota]-1)))=-[Monday]*2
Hi Jeff,

Choose one:

"Every other Monday" can be odd
(or "every other Monday" can be even).

((Weekday(DateAdd("d",txb_MonthStartDate,[Iota]-1)))=-[Monday]*2)
AND
((Day(DateAdd("d",txb_MonthStartDate,[Iota]-1))) MOD 2 = 1)

or

((Weekday(DateAdd("d",txb_MonthStartDate,[Iota]-1)))=-[Monday]*2)
AND
((Day(DateAdd("d",txb_MonthStartDate,[Iota]-1))) MOD 2 = 0)

Good luck,

Gary Walter
 

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