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  

How to get the "Year" our of a "date"



 
 
Thread Tools Display Modes
  #1  
Old May 15th, 2008, 04:37 PM posted to microsoft.public.access.forms
Dave
external usenet poster
 
Posts: 218
Default How to get the "Year" our of a "date"

Access 2003

Unbound box with this control Source:

=Forms![Dashboard-SafetyManagement]!txtEndDate

I want to show just the year

Tried several variations of this:
=Forms![Dashboard-SafetyManagement]!Year([txtEndDate])

Any help here will be appreciated.

Thanks in advance
dave
  #2  
Old May 15th, 2008, 04:45 PM posted to microsoft.public.access.forms
BruceM[_2_]
external usenet poster
 
Posts: 1,763
Default How to get the "Year" our of a "date"

Use the Year function with the entire expression:
=Year(Forms![Dashboard-SafetyManagement]![txtEndDate])

"Dave" dave@accessdatapros wrote in message
...
Access 2003

Unbound box with this control Source:

=Forms![Dashboard-SafetyManagement]!txtEndDate

I want to show just the year

Tried several variations of this:
=Forms![Dashboard-SafetyManagement]!Year([txtEndDate])

Any help here will be appreciated.

Thanks in advance dave


  #3  
Old May 15th, 2008, 04:49 PM posted to microsoft.public.access.forms
Dave
external usenet poster
 
Posts: 218
Default How to get the "Year" our of a "date"

Tried that before I posted also and it did not work.

However
formatting the field to: YYYY did work

Thanks much

dave

"BruceM" wrote in message
...
Use the Year function with the entire expression:
=Year(Forms![Dashboard-SafetyManagement]![txtEndDate])

"Dave" dave@accessdatapros wrote in message
...
Access 2003

Unbound box with this control Source:

=Forms![Dashboard-SafetyManagement]!txtEndDate

I want to show just the year

Tried several variations of this:
=Forms![Dashboard-SafetyManagement]!Year([txtEndDate])

Any help here will be appreciated.

Thanks in advance dave


  #4  
Old May 15th, 2008, 05:02 PM posted to microsoft.public.access.forms
BruceM[_2_]
external usenet poster
 
Posts: 1,763
Default How to get the "Year" our of a "date"

It worked in my test, but perhaps in your project there was already a fomat
in the text box or something like that. Formatting is a perfectly valid
approach, too. Probably better, in fact.

"Dave" dave@accessdatapros wrote in message
...
Tried that before I posted also and it did not work.

However
formatting the field to: YYYY did work

Thanks much

dave

"BruceM" wrote in message
...
Use the Year function with the entire expression:
=Year(Forms![Dashboard-SafetyManagement]![txtEndDate])

"Dave" dave@accessdatapros wrote in message
...
Access 2003

Unbound box with this control Source:

=Forms![Dashboard-SafetyManagement]!txtEndDate

I want to show just the year

Tried several variations of this:
=Forms![Dashboard-SafetyManagement]!Year([txtEndDate])

Any help here will be appreciated.

Thanks in advance dave



  #5  
Old May 15th, 2008, 05:09 PM posted to microsoft.public.access.forms
Dave
external usenet poster
 
Posts: 218
Default How to get the "Year" our of a "date"

I very likely could have tried the first example BEFORE I set the formatting
(originally it was mm/dd/yy), which I assume would keep it from working the
way I wanted.

Thanks

dave



"BruceM" wrote in message
...
It worked in my test, but perhaps in your project there was already a
fomat in the text box or something like that. Formatting is a perfectly
valid approach, too. Probably better, in fact.

"Dave" dave@accessdatapros wrote in message
...
Tried that before I posted also and it did not work.

However
formatting the field to: YYYY did work

Thanks much

dave

"BruceM" wrote in message
...
Use the Year function with the entire expression:
=Year(Forms![Dashboard-SafetyManagement]![txtEndDate])

"Dave" dave@accessdatapros wrote in message
...
Access 2003

Unbound box with this control Source:

=Forms![Dashboard-SafetyManagement]!txtEndDate

I want to show just the year

Tried several variations of this:
=Forms![Dashboard-SafetyManagement]!Year([txtEndDate])

Any help here will be appreciated.

Thanks in advance dave


 




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 06:38 AM.


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