date function

  • Thread starter Thread starter cjgav
  • Start date Start date
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.
 
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."
 
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."
 
Hi
Thank you both for your help .
I am not sure how to enter this code in my database !
can you help ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top