oxicottin
Learning by pecking away....
- Local time
- Today, 03:14
- Joined
- Jun 26, 2007
- Messages
- 888
Hello I have the code below behind a button to get the current Fridays date. I tried it today which is Friday so it should give me todays date but it gives me next weeks Friday. What needs to be done in order to get the current Friday even if your on a Friday? Thanks!
Code:
Private Sub cmdCurrentFriday_Click()
Dim dCurrentFriday As Date
dCurrentFriday = DateAdd("d", 8 - Weekday(Date, vbFriday), Date)
Me.txtWeekEnding = dCurrentFriday
Me.txtMondaysDate.Requery
Me.txtTuesdaysDate.Requery
Me.txtWednsdaysDate.Requery
Me.txtThursdaysDate.Requery
Me.txtFridaysDate.Requery
End Sub