not_rich_yet
03-23-2002, 11:20 AM
Is there a way I can display the name of the weekday in a text box? ie display Monday, Tuesday, Wednesday etc etc?
Thanks,
nry
Thanks,
nry
|
View Full Version : Display weekday name in control not_rich_yet 03-23-2002, 11:20 AM Is there a way I can display the name of the weekday in a text box? ie display Monday, Tuesday, Wednesday etc etc? Thanks, nry Rupert57 03-23-2002, 11:47 AM Put this in a module: Function DayOfWeek(UserDate) ' 'Return calander day for date in long format - Monday, Tuesday etc. ' DayOfWeek = Format(UserDate, "dddd") End Function Then use it as the control source of your text box like this "=DayOfWeek([DoB])" Where [DoB] is the name of a field with a date in it. In this example DoB stands for Date of Birth. You could replace [DoB] with Date() and you would then get todays weekday. not_rich_yet 03-23-2002, 11:59 AM Hmm, this gives me '#Name?' in the relevant text box? Pat Hartman 03-23-2002, 01:08 PM Rupert's function requires that you pass it a date. A simple solution if you just want today's day name is: = Format(Date(), "dddd") not_rich_yet 03-23-2002, 01:13 PM Great, that was simple! Thanks, nry |