A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

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



 
 
Thread Tools Display Modes
  #1  
Old January 19th, 2010, 12:57 AM posted to microsoft.public.access.forms
George
external usenet poster
 
Posts: 883
Default Extract a 3 digit day from a date field into its own field.

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
  #2  
Old January 19th, 2010, 02:00 AM posted to microsoft.public.access.forms
Linq Adams via AccessMonster.com
external usenet poster
 
Posts: 1,474
Default Extract a 3 digit day from a date field into its own field.

Is this a Single View Form?

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201001/1

  #3  
Old January 19th, 2010, 02:15 AM posted to microsoft.public.access.forms
Linq Adams via AccessMonster.com
external usenet poster
 
Posts: 1,474
Default Extract a 3 digit day from a date field into its own field.

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)

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201001/1

  #4  
Old January 19th, 2010, 03:29 AM posted to microsoft.public.access.forms
Clifford Bass via AccessMonster.com
external usenet poster
 
Posts: 150
Default Extract a 3 digit day from a date field into its own field.

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

George wrote:
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


--
Message posted via http://www.accessmonster.com

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:56 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.