Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-29-2011, 11:58 AM
fithawk fithawk is offline Auto insert year only Windows Vista Auto insert year only Office 2007
Novice
Auto insert year only
 
Join Date: Oct 2011
Posts: 3
fithawk is on a distinguished road
Default Auto insert year only

Hi. How can I automatically insert the current year into a doc that updates itself? Thanks

Last edited by fithawk; 10-30-2011 at 08:34 AM. Reason: clarify
Reply With Quote
  #2  
Old 10-31-2011, 02:14 AM
macropod's Avatar
macropod macropod is offline Auto insert year only Windows 7 64bit Auto insert year only Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi fithawk,

You don't need a useform or vba coding for this, Simply use a DATE field in the document, coded as:
{DATE \@ YYYY}

Note: The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you can't simply type them or copy & paste them from this message.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 10-31-2011, 03:46 AM
fithawk fithawk is offline Auto insert year only Windows Vista Auto insert year only Office 2007
Novice
Auto insert year only
 
Join Date: Oct 2011
Posts: 3
fithawk is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
Hi fithawk,

You don't need a useform or vba coding for this, Simply use a DATE field in the document, coded as:
{DATE \@ YYYY}

Note: The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you can't simply type them or copy & paste them from this message.
Probably me being a basic user! Getting a syntax error when pasting your field?
Reply With Quote
  #4  
Old 10-31-2011, 05:48 AM
macropod's Avatar
macropod macropod is offline Auto insert year only Windows 7 64bit Auto insert year only Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

I am unable to replicate that behaviour. Can you describe exactly what you're doing?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 10-31-2011, 06:28 AM
fithawk fithawk is offline Auto insert year only Windows Vista Auto insert year only Office 2007
Novice
Auto insert year only
 
Join Date: Oct 2011
Posts: 3
fithawk is on a distinguished road
Default

Highlighting area for insertion, going to quick parts/field codes/formula (pasting your formula there). Hope that helps? Thanks
Reply With Quote
  #6  
Old 10-31-2011, 06:32 AM
macropod's Avatar
macropod macropod is offline Auto insert year only Windows 7 64bit Auto insert year only Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Well, that's not how I described creating the field but, provided you delete the '=' from the formula field's code, it should work fine.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 12-16-2016, 09:49 AM
mrsevilbrooks mrsevilbrooks is offline Auto insert year only Windows 10 Auto insert year only Office 2016
Novice
 
Join Date: Dec 2016
Posts: 2
mrsevilbrooks is on a distinguished road
Default Still confused

I'm a real newby to this version of Access (2016). I want to make an automatically incremental file number for each of my records. I want this format: YY-000-A. How do I get that both in a table and in my reports? Right now I have it split into 3 different fields. Is there a way to put it all in the same field? If not, how to I make the table field/report field just give me the two number year automatically? Thanks.
Reply With Quote
  #8  
Old 12-16-2016, 01:29 PM
Charles Kenyon Charles Kenyon is online now Auto insert year only Windows 10 Auto insert year only Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,166
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Quote:
I'm a real newby to this version of Access (2016).
Ah! The root of the problem is that this is a forum about Word. While it is possible that a Word field would work in Access, I would not expect it to do so.
Using Date Fields in Microsoft Word
Reply With Quote
  #9  
Old 12-16-2016, 07:23 PM
mrsevilbrooks mrsevilbrooks is offline Auto insert year only Windows 10 Auto insert year only Office 2016
Novice
 
Join Date: Dec 2016
Posts: 2
mrsevilbrooks is on a distinguished road
Default

Quote:
Originally Posted by Charles Kenyon View Post
Ah! The root of the problem is that this is a forum about Word. While it is possible that a Word field would work in Access, I would not expect it to do so.
Using Date Fields in Microsoft Word
I suppose that's why the previous answers didn't make sense to me! That's what I get for not being more precise with Google. Thanks, and my apologies.
Reply With Quote
  #10  
Old 12-16-2016, 10:36 PM
macropod's Avatar
macropod macropod is offline Auto insert year only Windows 7 64bit Auto insert year only Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

For Access-related questions, you should visit AccessForums: http://www.accessforums.net/
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #11  
Old 12-21-2016, 02:14 AM
thosecars82 thosecars82 is offline Auto insert year only Windows Vista Auto insert year only Office 2007
Novice
 
Join Date: Jun 2011
Posts: 4
thosecars82 is on a distinguished road
Default

Is there any way to insert the next year automatically in Word? That is to say, if the current year is YYYY, how can I insert YYYY+1?
Thanks
Reply With Quote
  #12  
Old 12-21-2016, 02:50 AM
macropod's Avatar
macropod macropod is offline Auto insert year only Windows 7 64bit Auto insert year only Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You could create a custom Quick Part (aka Building Block) containing a field coded as:
{={DATE \@ YYYY}+1}
Note: The field brace pairs (i.e. '{ }') for the above example are all created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac); you can't simply type them or copy & paste them from this message. Nor is it practical to add them via any of the standard Word dialogues.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula to calculate Leap Year USAOz Excel 2 09-11-2011 04:58 PM
Creative Ways for a year-to-year comparison??? ridonkulous5 Excel 1 03-23-2011 04:49 PM
Auto insert year only Year janak Excel 6 12-12-2010 10:08 PM
Form auto insert DaveC Word 4 06-20-2010 04:14 AM
Auto insert year only Auto insert current month's name and current year Styler001 Word 4 01-25-2010 06:40 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:16 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft