Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Undo Control Not working

Avatar of 4charity
4charity asked on
Microsoft Access
20 Comments1 Solution440 ViewsLast Modified:
I am trying to put some code on a date field, so that a date in the future cannot be accidentally typed in. If the date is in the future, I want a message box to appear, and the control to be cleared for a new (correct) date entered. The message box pops up, but the control doesn't clear. Any suggestions?

Private Sub InvoiceDate_BeforeUpdate(Cancel As Integer)

If Me.InvoiceDate > Now() Then
MsgBox "Invoice Date Cannot be in the future. Please adjust."

End If

End Sub
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)Flag of United States of America imageDatabase Architect / Application Developer
This problem has been solved!
Unlock 1 Answer and 20 Comments.
See Answers