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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

default date value

Status
Not open for further replies.

DavidCat

Programmer
Nov 19, 2000
10
AU
I have a textbox on a form and I want to set it's default value to be the date of the coming Friday e.g. suppose today is Thursday 10th of March, I want the default value of the textbox to read Friday 11th March. I am sure I have done this before, but I can't remember how. I do remember it was quite long winded the way I did it, but is there a simple way to this?
 
This should be what you're looking for...
DateAdd("d", 8 - WeekDay(Date, vbFriday), Date)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top