N not_rich_yet Registered User. Local time Today, 20:08 Joined Mar 19, 2002 Messages 39 Mar 23, 2002 #1 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
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
R Rupert57 New member Local time Today, 20:08 Joined Mar 23, 2002 Messages 6 Mar 23, 2002 #2 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.
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.
N not_rich_yet Registered User. Local time Today, 20:08 Joined Mar 19, 2002 Messages 39 Mar 23, 2002 #3 Hmm, this gives me '#Name?' in the relevant text box?
P Pat Hartman Super Moderator Staff member Local time Today, 15:08 Joined Feb 19, 2002 Messages 47,179 Mar 23, 2002 #4 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")
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")
N not_rich_yet Registered User. Local time Today, 20:08 Joined Mar 19, 2002 Messages 39 Mar 23, 2002 #5 Great, that was simple! Thanks, nry