Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Day of week for Date in Function. 1

Status
Not open for further replies.

ffleitas

Technical User
Mar 15, 2001
85
US
Hello programmers,

If I place this in a VB function:

[Date2] = Date - Weekday(Date) + 2

field [Date2] being today's date of Monday 07/21/03 would it equal Date - Weekday(Date) +2? If not what would be the correct formula for them to equal?

I am trying to get a condition to run if true ex.
If [Date2] = Date - Weekday(Date) + 2 Then
DoCmd.RunMacro stDocMonday

Thanks
 
Forgive me, but if you're trying to run a macro on a Monday why not use the following?
If Weekday([Date2]) = vbMonday Then DoCmd.RunMacro stDocMonday
Simon Rouse
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top