Every other monday

  • Thread starter Thread starter Jeff
  • Start date Start date
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
 
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
 
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
 
Back
Top