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 » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

code to correct leap yr problem in February 2004



 
 
Thread Tools Display Modes
  #1  
Old September 28th, 2004, 06:31 PM
ron
external usenet poster
 
Posts: n/a
Default code to correct leap yr problem in February 2004

I am using Access 2000....

Does anyone have code to solve the leap year problem in
February 2004.



  #2  
Old September 28th, 2004, 06:44 PM
Dirk Goldgar
external usenet poster
 
Posts: n/a
Default

"ron" wrote in message

I am using Access 2000....

Does anyone have code to solve the leap year problem in
February 2004.


And what is this leap year problem? The built-in VBA date-handling
routines all understand about leap year.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


  #3  
Old September 28th, 2004, 11:43 PM
ron_1945
external usenet poster
 
Posts: n/a
Default

Hi Dirk,

Thank you for the quick response. In my Access 2000 db, I have a need to
extend the contract out(future) by a year, what is the best method to
determine whether to add 365 or 366 days to get the proper one year
extension(future), or is there a function to add "a year"? Any suggestions
would be appreciated?

Thanks, Ron

"Dirk Goldgar" wrote:

"ron" wrote in message

I am using Access 2000....

Does anyone have code to solve the leap year problem in
February 2004.


And what is this leap year problem? The built-in VBA date-handling
routines all understand about leap year.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)



  #4  
Old September 29th, 2004, 12:01 AM
Douglas J. Steele
external usenet poster
 
Posts: n/a
Default

DateAdd("yyyy", 1, OriginalDate)

or

DateSerial(Year(OriginalDate)+1, Month(OriginalDate), Day(OriginalDate))


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"ron_1945" wrote in message
...
Hi Dirk,

Thank you for the quick response. In my Access 2000 db, I have a need to
extend the contract out(future) by a year, what is the best method to
determine whether to add 365 or 366 days to get the proper one year
extension(future), or is there a function to add "a year"? Any

suggestions
would be appreciated?

Thanks, Ron

"Dirk Goldgar" wrote:

"ron" wrote in message

I am using Access 2000....

Does anyone have code to solve the leap year problem in
February 2004.


And what is this leap year problem? The built-in VBA date-handling
routines all understand about leap year.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)





  #5  
Old October 2nd, 2004, 05:03 PM
ron_1945
external usenet poster
 
Posts: n/a
Default

Hi Doug, Thank you very much for your help; I used your first code and it
worked out just fine...
I do appreciate the help...THANKS AGAIN, Ron from Calif

"Douglas J. Steele" wrote:

DateAdd("yyyy", 1, OriginalDate)

or

DateSerial(Year(OriginalDate)+1, Month(OriginalDate), Day(OriginalDate))


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"ron_1945" wrote in message
...
Hi Dirk,

Thank you for the quick response. In my Access 2000 db, I have a need to
extend the contract out(future) by a year, what is the best method to
determine whether to add 365 or 366 days to get the proper one year
extension(future), or is there a function to add "a year"? Any

suggestions
would be appreciated?

Thanks, Ron

"Dirk Goldgar" wrote:

"ron" wrote in message

I am using Access 2000....

Does anyone have code to solve the leap year problem in
February 2004.

And what is this leap year problem? The built-in VBA date-handling
routines all understand about leap year.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)






 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Export to RTF very slow when code is present in Access report. [email protected] Setting Up & Running Reports 11 September 14th, 2004 08:17 PM
Excel VBA - Simple Code Problem Frank Kabel Worksheet Functions 1 April 14th, 2004 03:06 PM
February 2004 Absent Bob Phillips Worksheet Functions 3 December 14th, 2003 01:38 AM
Code problem Phil Hageman Charts and Charting 1 November 20th, 2003 08:55 PM
Problem formatting ZIP code in mail merge Peter Serratore Setting up and Configuration 6 October 18th, 2003 01:50 AM


All times are GMT +1. The time now is 05:54 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.