Calculate the Date+14 days...

Carl_R

Registered User.
Local time
Today, 20:34
Joined
Aug 16, 2002
Messages
82
*Access97*

I have a form with a textbox called [ImplementationDate]. The user is free to enter a date into the textbox.

What I am trying to achieve (unsuccessfully) is a way where the user cannot enter a date unless it is at least 14 days greater than todays date.

I have tried (unsuccessfully) to place this on the BeforeUpdate property:

if Me.ImplementationDate < Me.Date123 + 14 Then msgbox "text".... 'Date123= Date()

The code does absolutely nothing - no errors either.

I left my brain on a beach in Tobago so if anyone finds it, there's a small reward. Until it's found, any help would be greatly appreciated :)
 
Your code is correct however try the AFTER update instead.
 
Code:
If Me.ImplementationDate < CDate(Me.Date123 + 14) Then
    msgbox "text"
    Cancel = True
End If
 

Users who are viewing this thread

Back
Top Bottom