×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# Popup reminder 2 workdays before a set date

## Popup reminder 2 workdays before a set date

(OP)
I have a field in my DB that contains the shipdate for a shipment.

Is there a way to set up a popup reminder, let's say two workdays before the actual shipdate?

If the actual shipdate is on a thursday, the popup will show itself on a tuesday.
If the shipdate is on a tuesday, the popup will show on friday.
If the shipdate is on monday, the popup will show on thursday.

Thanks for all help!

Chris

### RE: Popup reminder 2 workdays before a set date

Basically you want the popup 2 days before the shipmentday, but not in a weekend.

You didn't mention if the shipmentday can be a weekendday...

In plain English: reminderDate = shipmentDate - 2.
If reminderDate = Sunday give Friday; if reminderDate = Saturday give Thursday.

You could do that with the DayName function but that's not a very goos idea. If the OS or the FM language is not English, it will not work.

Brings us at the calculation level.

Basiccalc is reminderDate = shipmentDate -2.
To check if the reminderDate is a weekend day you can use the DayOfWeek function, which will give you a number from 1 to 7, where 1 is for Sunday, 2 for Monday etc.

When you plug this knowledge into your formula with a Case statement, you can have something along these lines:

Case(
DayOfWeek ( dateShipment ) - 2 = 1;dateShipment - 4;
DayOfWeek ( dateShipment ) - 2 = 0;dateShipment - 3 ;
dateShipment - 2
)

If you want a more technical formula, but also shorter, result date:
dateShipment  -  Middle("4342222"; Mod(dateShipment - Date(1;3;1904); 7) + 1;1)

Now you can plug this result into the remindertext you want and tied that to whatever script you want in wathever layout you want.
To play with 1 day more or less, just change the value of the calc day.
I think (didn't check the calcs) the result will be a Friday if the shipmentday is a Monday....
But this will set you on the way...

HTH

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Close Box

# Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!