date function

C

cjgav

I am creating a customer database for my repair business.
I would like to create a field that displays tomorrows date except on a
Tuesday when it displays the next Thursdays date and on a Saturday it
displays the next Mondays date.
Is this possible.
 
A

Al Campagna

cjgav,
Try...
Private Function GetDate()
Select Case WeekDay(Date)
Case 3 ' If Tuesday
SomeDate = DateAdd("d", 9, Date)
Case 7 ' If Saturday
SomeDate = DateAdd("d", 2, Date)
Case Else
SomeDate = DateAdd("d", 1, Date)
End Select
End Function
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
A

Al Campagna

ruralguy,
Glad I read your post on a revisit to this thread. I totally blew the
"Tuesday" logic, and didn't realize it.
That's why they call it "Al's"-heimers. :-D
I've directed the OP to your code...
--
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
C

cjgav

Hi
Thank you both for your help .
I am not sure how to enter this code in my database !
can you help ?
 
Top