Message Box

AccessHelp

New Member
Joined
Jun 26, 2003
Messages
4
Hello,

How do I display a message box that displays automatically a specific message 4 days before the actual date an event is scheduled?

Thanks
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
You could use the form's Current event (this occurs when you change records), then reference the field in question and if the date is within four days of now then show your message. This isn't tested, but should give you a start, I've called the field EventDate, change as necessary-

Code:
Private Sub Form_Current()

If Date - Me!EventDate.Value <= 4 Then
MsgBox "Your Message"
End If

End Sub

If you want it specifically to be 4 days before the event, then remove the less than chevron in the code.
 
Upvote 0

Forum statistics

Threads
1,221,537
Messages
6,160,401
Members
451,645
Latest member
hglymph

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top