Stop old dates

K1Kingy

Registered User.
Local time
Today, 14:50
Joined
Jun 12, 2008
Messages
20
I have a database for a library and when issuing books the issueDate and bookReturnDate gets inserted automatically so that works good. Dates can be edited though, what i was wanting to do is stop old dates been inserted if they are edited.
 
Do a test on the edited date and if it is less than today's Date() then pop up a message box to notify the user that they have entered an invalid date.
 
Set the control property Locked to Yes.
 
I don't want to lock some of them because i want to be able to change the due date for some books, but obviously i wouldn't want a date set that has already been :)

I came up with some code that is executed AfterUpdate..

Code:
If issueDate < Now() Then

MsgBox("Incorrect Date Entered")
issueDate = Now()

End IF
 

Users who are viewing this thread

Back
Top Bottom