day of week - help

Kroghr

Registered User.
Local time
Tomorrow, 02:58
Joined
Oct 20, 2008
Messages
17
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
 
i'm sure you know how to write IF statements, so use the weekday() function on the text box to get your determination:
Code:
if weekday(me.flightdate) = 3 OR weekday(me.flightdate) = 4 then

etc..
 

Users who are viewing this thread

Back
Top Bottom