Hello all. I am building a database for a non-profit to help them track classes they provide to community members. I have a table called ClassTable that has a field called SessionDate that is used to record the date and time of a class. Is there anyway to force the user to include the time in the field along with the date. For example, if the user places the date 12/1/2018 in the field and then tries to move on he/she would be advised that he/she must include a time with the entry. I tried coding using the len function, with the following code on the AfterUpdate event:
If SessionDate.Value <> Null Then
If Len(SessionDate) < 12 Then
MsgBox "You need to include the time of the meeting also", vbOKOnly
Else
End If
End If
(I used the "<12" because if determined that the maximum date with out a time would still be less than 12 characters long)
but this didn't work. I thought there might be a way to use a "mask" on the field properties but I'm not having any success.
Any ideas?
Thanks for the help.