Extract a 3 digit day from a date field into its own field.

G

George

I created a Data Entry Form which allows a person to enter a date into one of
the fields. The next field requires a 3 digit day entry (Example---Mon, Tue,
Wed, Thu Fri, Sat, Sun). I would like to automate this and have the day
inserted after the date is supplied in the previous field.
Thanks
George
 
L

Linq Adams via AccessMonster.com

Regardless of the form view, since this is a calculated value it should be
placed in an unbound field, i.e. it shouldn't be stored in a table.

In the Control Source for the DayField Textbox use this

=IIF(Not IsNull([DateField]),Format([DateField], "ddd"), Null)
 
C

Clifford Bass via AccessMonster.com

Hi George,

Of course you could just format the date field to display the day in the
three-letter format. On entry into the field, it will revert to the locale
format. So if you set the format to "ddd mm/dd/yyyy" it will show Fri
01/01/2010 when not in the field. On entry to the field it will show
1/1/2010.

Clifford Bass
 

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