Lock Calendar

  • Thread starter Thread starter Lori
  • Start date Start date
L

Lori

I have a calendar form that our employees are using to enter in vacation
days, sick days, etc. My question hopefully has a simple answer.

How do I prevent a user from changing information on a past date? They
should be able to edit future dates where they may have scheduled a day off
but not dates that have already passed.

Any help would be appreciated.
 
Ideally this should work perfect but maybe its the form.

I was sent this form to use, created by Ray Corbin as a monthly schedule
calendar.
The form is set up using unbound text boxes with =ThisIs() in the On Click
event. The code for the form includes:

Function ThisIs()
Dim TDate As Date, C1 As Integer, StrSQL As String, TypeAttend, RecDetect
C1 = 1: TDate = Me![scr1Date]
Do Until C1 = CInt(Mid(ActiveControl.Name, 3, 2))
TDate = DateAdd("d", 1, TDate)
C1 = C1 + 1
Loop

This code enters the dates for the given month. These boxes are named CC01,
CC02, etc.

Now I know I would need to put this code in for each textbox but when I
tested in on the first (CC01) the word "locked" gave me a "compile error"
"Method or Data Member not found".

Any ideas?
 
Back
Top