Question about Date validation

  • Thread starter Thread starter NoviceNana
  • Start date Start date
N

NoviceNana

Hi All,

I'm working on a form for weekly data entry. I'd like to create a
date field where the user will enter the date the week ends (ie week
ending Friday, June 25th). Is there a way to write code so that
Access will check that the day the user inputs is a Friday (and if not
they will recieve an error message)?. I know how to program the
error message pop-up box, but I have no idea how to write code to
check if the date inputted is a Friday.

Any help would be greatly appreciated!
Thanks
 
Since you want to throw an error message if the date IS NOT a Friday,
shouldn't it be

If WeekDay(Me.DateField) <> 6 Then
MsgBox "Error"
End If
 
Back
Top