L
lillylazer666
I've come up a bit of a problem with a planner/reminder program I am
making. I am using a Month view calander as a date selection option,
and am using this to write reminders to files using the code below:
Private Sub cmdSaveEntry_Click()
Dim PlannerDate As String, PlannerEntry As String, response As
Integer
myFile = FreeFile
PlannerDate = Calender.Value
PlannerEntry = planner.Text
If planner.Text = "" Then
response = MsgBox("You must enter some Data")
If response = vbOK Then
Exit Sub
End If
Else
Open App.Path & "\PlannerText.txt" For Append Access Write As
#myFile 'opens the text file
Write #myFile, PlannerDate, PlannerEntry 'writes the data into
the text file
Close #myFile
End If
Call myReDimArrays(PlannerDate, PlannerEntry) 'call procedure
planner.Visible = False
cmdSaveEntry.Visible = False
End Sub
However, I've realised that this will not prevent someone making an
appointment on a date in the past. When it comes to date codes, I'm
awful so can anyone suggest a quick and easy way to make sure
appointments can't be made for dates that are in the past. Help would
be very welcome.
making. I am using a Month view calander as a date selection option,
and am using this to write reminders to files using the code below:
Private Sub cmdSaveEntry_Click()
Dim PlannerDate As String, PlannerEntry As String, response As
Integer
myFile = FreeFile
PlannerDate = Calender.Value
PlannerEntry = planner.Text
If planner.Text = "" Then
response = MsgBox("You must enter some Data")
If response = vbOK Then
Exit Sub
End If
Else
Open App.Path & "\PlannerText.txt" For Append Access Write As
#myFile 'opens the text file
Write #myFile, PlannerDate, PlannerEntry 'writes the data into
the text file
Close #myFile
End If
Call myReDimArrays(PlannerDate, PlannerEntry) 'call procedure
planner.Visible = False
cmdSaveEntry.Visible = False
End Sub
However, I've realised that this will not prevent someone making an
appointment on a date in the past. When it comes to date codes, I'm
awful so can anyone suggest a quick and easy way to make sure
appointments can't be made for dates that are in the past. Help would
be very welcome.