Question about Date validation

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
 
M

missinglinq via AccessMonster.com

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top