Date Problem

GregSmith

Registered User.
Local time
Today, 14:51
Joined
Feb 22, 2002
Messages
126
I have a log that auto signs a return date from a selection.

If you select a week it just adds 7 days to the current date
If you select a month it just adds a year to the current date
If you select a year it just adds 7 years to the current date.

I have it check to see if the return date is on a Saturday and if it is, subtract a day and if the return date is on a Sunday add a day.

Any ideas how to get it to subtract the currect day?

I am using the following:

If DayName = "Saturday" Then Me.[Return Date1] = DateAdd("d", -1, Date)
If DayName = "Sunday" Then Me.[Return Date1] = DateAdd("d", 1, Date)

Only thing is, it subtracts 3 days instead of 1.
 
If DayName = "Saturday" Then Me.[Return Date1] = DateAdd("d", -1, Date)
If DayName = "Sunday" Then Me.[Return Date1] = DateAdd("d", 1, Date)

Needs to be

If DayName = "Saturday" Then Me.[Return Date1] = DateAdd("d", 2, Return Date1)
If DayName = "Sunday" Then Me.[Return Date1] = DateAdd("d", 1, Return Date1)

It works correctly now...
 

Users who are viewing this thread

Back
Top Bottom