RE: How to display and store current Week Ending Date (Saturday's)
- From: Wayne-I-M <WayneIM@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 17 May 2009 08:13:01 -0700
Hi
If you have 2 boxes on your form
MyDateBox (where you enter a date)
MySaturdayBox (where you want the next saturday shown - or today if it's Sat
today)
You could have some like this on the AfterUpdate event of your MyDateBox
Private Sub MyDateBox_AfterUpdate()
Me.MySaturdayBox = DateAdd("d", vbSaturday - Weekday(Me.MyDateBox,
vbSunday), Me.MyDateBox)
End Sub
Hope this helps
--
Wayne
Manchester, England.
"ianw" wrote:
I need help in VBA to work out and store week ending dates (Saturday’s) for a.
new Time *** application.
I would like Saturday’s week ending date to appear on each days use of the
Time *** form, that would increment each week.
If the time *** form is opened on a Saturday, the week ending date needs
to show as being the same day.
It would also be useful to have the latest week ending date stored as a
singular record in a new table for use in reporting other data using the
latest week ending date.
- References:
- Prev by Date: Re: Multiple Fields in record
- Next by Date: Re: Multiple Fields in record
- Previous by thread: How to display and store current Week Ending Date (Saturday's)
- Next by thread: Re: How to display and store current Week Ending Date (Saturday's)
- Index(es):