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  

Date Diff Questions



 
 
Thread Tools Display Modes
  #1  
Old October 20th, 2009, 05:45 PM posted to microsoft.public.access.forms
Joe
external usenet poster
 
Posts: 1,218
Default Date Diff Questions

How can I make a date calc based on the users input?

For example:
If the user enters 11/01/09 on the end EndDate the BeginDate would be
10/31/08. If the user enters 11/30/09 on the EndDate the BeginDate would be
11/01/09.

I currently have the following formula but its not working properly b/c of
the example provided above. It always captures 11/01/08.

=DateAdd("m",-12,[txtEndDate])

Any help would be good :-)

  #2  
Old October 20th, 2009, 06:01 PM posted to microsoft.public.access.forms
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Date Diff Questions

You posted in a newsgroup supporting MS Access and forms. Is that where you
are trying to do this?

Are your controls ([EndDate], [BeginDate]) unbound or bound to some
underlying table?

Where do you have that formula?

How does Access know it's supposed to do (?re-do) the calculation?

More info, please...

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or psuedocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"Joe" wrote in message
...
How can I make a date calc based on the users input?

For example:
If the user enters 11/01/09 on the end EndDate the BeginDate would be
10/31/08. If the user enters 11/30/09 on the EndDate the BeginDate would
be
11/01/09.

I currently have the following formula but its not working properly b/c of
the example provided above. It always captures 11/01/08.

=DateAdd("m",-12,[txtEndDate])

Any help would be good :-)



  #3  
Old October 20th, 2009, 06:35 PM posted to microsoft.public.access.forms
S.Clark[_2_]
external usenet poster
 
Posts: 423
Default Date Diff Questions

I don't have a grasp of your business rules.

Why does 11/01/09 get 10/31/08 (one year and one day prior), but 11/30/09
gets 11/01/08, on year and 29 days prior.

"Joe" wrote:

How can I make a date calc based on the users input?

For example:
If the user enters 11/01/09 on the end EndDate the BeginDate would be
10/31/08. If the user enters 11/30/09 on the EndDate the BeginDate would be
11/01/09.

I currently have the following formula but its not working properly b/c of
the example provided above. It always captures 11/01/08.

=DateAdd("m",-12,[txtEndDate])

Any help would be good :-)

 




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:01 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.