View Full Version : day of week - help


Kroghr
03-13-2009, 04:33 PM
I have a field named FlightDate on a form. The field is formatted for short date. I also have 6 unbound text boxes names KWACO1, KWACO2, KWACO3 etc etc
I need a code that determines if Me.FlightDate is a Tuesday, then Me.KWACO1 = 0600, Me.KWACO2 = 0710, Me.KWACO3 = 1430
Wednesday, then Me.KWACO1 = 0600, Me.KWACO2 = 0710, Me.KWACO3 = 1430
I've tried formating the FlightDate as DDDD to determine the day of the week for the date selected and then used a if then statement, but it does not work.

Any advice would be greatly appreciated

ajetrumpet
03-13-2009, 05:50 PM
i'm sure you know how to write IF statements, so use the weekday() function on the text box to get your determination:if weekday(me.flightdate) = 3 OR weekday(me.flightdate) = 4 then

etc..