Date Fields on Form - Help?!

G

Guest

I have four feilds of which a date will be entered into the 1st field. I'm
trying to project future dates into the next 3 based on the following rules:
2nd field: must be 14 days out from the date in the first field, but always
on a Monday. So it wont always be exactly two weeks (maybe a little less).
The Monday must be the nearest Monday back. So if my entered date is Tuesday
March 20th the 2nd date must be Monday April 2nd as opposed to Monday April
9th. Again, if my 1st date was Wed the 21st or Thursday the 22nd my Monday
would still have to be April 2nd.
3rd and 4th Fields is always just 7 days after the Monday in field 2. I'm
guessing that whatever value i get in the 2nd filed and can do [Field 2]+7
and I'll be ok?
 
G

Guest

To get the first date try

DateAdd("d",14,[FieldName]) + 2 - WeekDay(DateAdd("d",14,[FieldName]))

The second date
[First Date] + 14

The third date
[Second Date] + 14
 
G

Guest

This worked perfect thanks!!! except that i used +7 on the last 2 fields
because they only need to be one week apart on the same day...

Thanks.

Ofer Cohen said:
To get the first date try

DateAdd("d",14,[FieldName]) + 2 - WeekDay(DateAdd("d",14,[FieldName]))

The second date
[First Date] + 14

The third date
[Second Date] + 14
--
Good Luck
BS"D


Adam said:
I have four feilds of which a date will be entered into the 1st field. I'm
trying to project future dates into the next 3 based on the following rules:
2nd field: must be 14 days out from the date in the first field, but always
on a Monday. So it wont always be exactly two weeks (maybe a little less).
The Monday must be the nearest Monday back. So if my entered date is Tuesday
March 20th the 2nd date must be Monday April 2nd as opposed to Monday April
9th. Again, if my 1st date was Wed the 21st or Thursday the 22nd my Monday
would still have to be April 2nd.
3rd and 4th Fields is always just 7 days after the Monday in field 2. I'm
guessing that whatever value i get in the 2nd filed and can do [Field 2]+7
and I'll be ok?
 
G

Guest

You right, in my head I had 14 from the first stage, I'm glad you got it
sorted out.

have a great day

--
Good Luck
BS"D


Adam said:
This worked perfect thanks!!! except that i used +7 on the last 2 fields
because they only need to be one week apart on the same day...

Thanks.

Ofer Cohen said:
To get the first date try

DateAdd("d",14,[FieldName]) + 2 - WeekDay(DateAdd("d",14,[FieldName]))

The second date
[First Date] + 14

The third date
[Second Date] + 14
--
Good Luck
BS"D


Adam said:
I have four feilds of which a date will be entered into the 1st field. I'm
trying to project future dates into the next 3 based on the following rules:
2nd field: must be 14 days out from the date in the first field, but always
on a Monday. So it wont always be exactly two weeks (maybe a little less).
The Monday must be the nearest Monday back. So if my entered date is Tuesday
March 20th the 2nd date must be Monday April 2nd as opposed to Monday April
9th. Again, if my 1st date was Wed the 21st or Thursday the 22nd my Monday
would still have to be April 2nd.
3rd and 4th Fields is always just 7 days after the Monday in field 2. I'm
guessing that whatever value i get in the 2nd filed and can do [Field 2]+7
and I'll be ok?
 

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

Similar Threads


Top