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 » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Previous value



 
 
Thread Tools Display Modes
  #1  
Old December 2nd, 2009, 04:46 PM posted to microsoft.public.access.reports
Warrio
external usenet poster
 
Posts: 38
Default Previous value

Hi there,

In a detail section, is there a way to get the previous field value in the
previous record?
I'm asking this because each current is calculated with the previous value.
The first a simple calculation based on current values.

looks like recursive code, but how to do without vba?

Thanks in advance for any good suggestion


  #2  
Old December 2nd, 2009, 06:14 PM posted to microsoft.public.access.reports
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Previous value

I can't tell from your description how you (and therefore, how Access)
determines "previous". You'll need to be able to define that in a way that
you can explain to Access.

If you are trying to build a "running sum" (again, not enough info in your
description), Access offers a Running Sum property for a textbox control in
a report definition.

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 pseudocode 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.

"warrio" wrote in message
...
Hi there,

In a detail section, is there a way to get the previous field value in the
previous record?
I'm asking this because each current is calculated with the previous
value. The first a simple calculation based on current values.

looks like recursive code, but how to do without vba?

Thanks in advance for any good suggestion



  #3  
Old December 2nd, 2009, 06:14 PM posted to microsoft.public.access.reports
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Previous value

I can't tell from your description how you (and therefore, how Access)
determines "previous". You'll need to be able to define that in a way that
you can explain to Access.

If you are trying to build a "running sum" (again, not enough info in your
description), Access offers a Running Sum property for a textbox control in
a report definition.

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 pseudocode 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.

"warrio" wrote in message
...
Hi there,

In a detail section, is there a way to get the previous field value in the
previous record?
I'm asking this because each current is calculated with the previous
value. The first a simple calculation based on current values.

looks like recursive code, but how to do without vba?

Thanks in advance for any good suggestion



  #4  
Old December 2nd, 2009, 06:14 PM posted to microsoft.public.access.reports
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Previous value

I can't tell from your description how you (and therefore, how Access)
determines "previous". You'll need to be able to define that in a way that
you can explain to Access.

If you are trying to build a "running sum" (again, not enough info in your
description), Access offers a Running Sum property for a textbox control in
a report definition.

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 pseudocode 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.

"warrio" wrote in message
...
Hi there,

In a detail section, is there a way to get the previous field value in the
previous record?
I'm asking this because each current is calculated with the previous
value. The first a simple calculation based on current values.

looks like recursive code, but how to do without vba?

Thanks in advance for any good suggestion



  #5  
Old December 2nd, 2009, 07:00 PM posted to microsoft.public.access.reports
Warrio
external usenet poster
 
Posts: 38
Default Previous value

Hi Jeff,
Thank you for having tried to understand my question. and sorry for not
making clear enough!
What I'm trying to calculate is chained year to date performance that you
calculate like:

First month: JanuaryPerf = X/(Y+Z)
Next month FebruaryPerf = (1 + JanuaryPerf) * (1 + (X/(Y+Z)))-1
Next month MarchPerf = (1 + FebruaryPerf) * (1 + (X/(Y+Z)))-1

It would have been easy to do it with a running sum if it was an addition,
but my desperate case, it's a product.
and I can't think of aggregate functions neither, because only the addition
is used whether in the sum or the avg function..

So what I'm doing now, because I haven't find an easier solution to it in a
query or a report is to calculate it in vba, store the result and display
them with the rest of info. unless you have a better advice

Thanks again






"Jeff Boyce" a écrit dans le message de news:
...
I can't tell from your description how you (and therefore, how Access)
determines "previous". You'll need to be able to define that in a way that
you can explain to Access.

If you are trying to build a "running sum" (again, not enough info in your
description), Access offers a Running Sum property for a textbox control
in a report definition.

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 pseudocode 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.

"warrio" wrote in message
...
Hi there,

In a detail section, is there a way to get the previous field value in
the previous record?
I'm asking this because each current is calculated with the previous
value. The first a simple calculation based on current values.

looks like recursive code, but how to do without vba?

Thanks in advance for any good suggestion





  #6  
Old December 2nd, 2009, 07:00 PM posted to microsoft.public.access.reports
Warrio
external usenet poster
 
Posts: 38
Default Previous value

Hi Jeff,
Thank you for having tried to understand my question. and sorry for not
making clear enough!
What I'm trying to calculate is chained year to date performance that you
calculate like:

First month: JanuaryPerf = X/(Y+Z)
Next month FebruaryPerf = (1 + JanuaryPerf) * (1 + (X/(Y+Z)))-1
Next month MarchPerf = (1 + FebruaryPerf) * (1 + (X/(Y+Z)))-1

It would have been easy to do it with a running sum if it was an addition,
but my desperate case, it's a product.
and I can't think of aggregate functions neither, because only the addition
is used whether in the sum or the avg function..

So what I'm doing now, because I haven't find an easier solution to it in a
query or a report is to calculate it in vba, store the result and display
them with the rest of info. unless you have a better advice

Thanks again






"Jeff Boyce" a écrit dans le message de news:
...
I can't tell from your description how you (and therefore, how Access)
determines "previous". You'll need to be able to define that in a way that
you can explain to Access.

If you are trying to build a "running sum" (again, not enough info in your
description), Access offers a Running Sum property for a textbox control
in a report definition.

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 pseudocode 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.

"warrio" wrote in message
...
Hi there,

In a detail section, is there a way to get the previous field value in
the previous record?
I'm asking this because each current is calculated with the previous
value. The first a simple calculation based on current values.

looks like recursive code, but how to do without vba?

Thanks in advance for any good suggestion





  #7  
Old December 2nd, 2009, 07:00 PM posted to microsoft.public.access.reports
Warrio
external usenet poster
 
Posts: 38
Default Previous value

Hi Jeff,
Thank you for having tried to understand my question. and sorry for not
making clear enough!
What I'm trying to calculate is chained year to date performance that you
calculate like:

First month: JanuaryPerf = X/(Y+Z)
Next month FebruaryPerf = (1 + JanuaryPerf) * (1 + (X/(Y+Z)))-1
Next month MarchPerf = (1 + FebruaryPerf) * (1 + (X/(Y+Z)))-1

It would have been easy to do it with a running sum if it was an addition,
but my desperate case, it's a product.
and I can't think of aggregate functions neither, because only the addition
is used whether in the sum or the avg function..

So what I'm doing now, because I haven't find an easier solution to it in a
query or a report is to calculate it in vba, store the result and display
them with the rest of info. unless you have a better advice

Thanks again






"Jeff Boyce" a écrit dans le message de news:
...
I can't tell from your description how you (and therefore, how Access)
determines "previous". You'll need to be able to define that in a way that
you can explain to Access.

If you are trying to build a "running sum" (again, not enough info in your
description), Access offers a Running Sum property for a textbox control
in a report definition.

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 pseudocode 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.

"warrio" wrote in message
...
Hi there,

In a detail section, is there a way to get the previous field value in
the previous record?
I'm asking this because each current is calculated with the previous
value. The first a simple calculation based on current values.

looks like recursive code, but how to do without vba?

Thanks in advance for any good suggestion





  #8  
Old December 2nd, 2009, 09:23 PM posted to microsoft.public.access.reports
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Previous value

I see nothing in your formula or description about "year". Are you
attempting to apply this across multiple years, or only for one year's data?

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 pseudocode 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.

"warrio" wrote in message
...
Hi Jeff,
Thank you for having tried to understand my question. and sorry for not
making clear enough!
What I'm trying to calculate is chained year to date performance that you
calculate like:

First month: JanuaryPerf = X/(Y+Z)
Next month FebruaryPerf = (1 + JanuaryPerf) * (1 + (X/(Y+Z)))-1
Next month MarchPerf = (1 + FebruaryPerf) * (1 + (X/(Y+Z)))-1

It would have been easy to do it with a running sum if it was an addition,
but my desperate case, it's a product.
and I can't think of aggregate functions neither, because only the
addition is used whether in the sum or the avg function..

So what I'm doing now, because I haven't find an easier solution to it in
a query or a report is to calculate it in vba, store the result and
display them with the rest of info. unless you have a better advice

Thanks again






"Jeff Boyce" a écrit dans le message de news:
...
I can't tell from your description how you (and therefore, how Access)
determines "previous". You'll need to be able to define that in a way
that you can explain to Access.

If you are trying to build a "running sum" (again, not enough info in
your description), Access offers a Running Sum property for a textbox
control in a report definition.

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 pseudocode 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.

"warrio" wrote in message
...
Hi there,

In a detail section, is there a way to get the previous field value in
the previous record?
I'm asking this because each current is calculated with the previous
value. The first a simple calculation based on current values.

looks like recursive code, but how to do without vba?

Thanks in advance for any good suggestion







  #9  
Old December 2nd, 2009, 09:38 PM posted to microsoft.public.access.reports
Warrio
external usenet poster
 
Posts: 38
Default Previous value

What I mean by a year to day performance is a performance calculated since
the beginning of the year until today

Generally from January to the current date (12 months maximum).



But I customize the formula by letting the user choose his own interval of
time. it can go from Date1 to Date2


Best regards

"Jeff Boyce" a écrit dans le message de news:
...
I see nothing in your formula or description about "year". Are you
attempting to apply this across multiple years, or only for one year's
data?

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 pseudocode 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.

"warrio" wrote in message
...
Hi Jeff,
Thank you for having tried to understand my question. and sorry for not
making clear enough!
What I'm trying to calculate is chained year to date performance that you
calculate like:

First month: JanuaryPerf = X/(Y+Z)
Next month FebruaryPerf = (1 + JanuaryPerf) * (1 + (X/(Y+Z)))-1
Next month MarchPerf = (1 + FebruaryPerf) * (1 + (X/(Y+Z)))-1

It would have been easy to do it with a running sum if it was an
addition, but my desperate case, it's a product.
and I can't think of aggregate functions neither, because only the
addition is used whether in the sum or the avg function..

So what I'm doing now, because I haven't find an easier solution to it in
a query or a report is to calculate it in vba, store the result and
display them with the rest of info. unless you have a better advice

Thanks again






"Jeff Boyce" a écrit dans le message de news:
...
I can't tell from your description how you (and therefore, how Access)
determines "previous". You'll need to be able to define that in a way
that you can explain to Access.

If you are trying to build a "running sum" (again, not enough info in
your description), Access offers a Running Sum property for a textbox
control in a report definition.

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 pseudocode 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.

"warrio" wrote in message
...
Hi there,

In a detail section, is there a way to get the previous field value in
the previous record?
I'm asking this because each current is calculated with the previous
value. The first a simple calculation based on current values.

looks like recursive code, but how to do without vba?

Thanks in advance for any good suggestion









  #10  
Old December 3rd, 2009, 12:45 AM posted to microsoft.public.access.reports
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Previous value

I still am not clear how you are limiting the records on which you are
trying to do this to the current year. What if someone entered the
following two values for Dates: 1/1/2008 to 12/31/2009

That date range would have two Januaries, and two Februaries, ...

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 pseudocode 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.

"warrio" wrote in message
...
What I mean by a year to day performance is a performance calculated since
the beginning of the year until today

Generally from January to the current date (12 months maximum).



But I customize the formula by letting the user choose his own interval of
time. it can go from Date1 to Date2


Best regards

"Jeff Boyce" a écrit dans le message de news:
...
I see nothing in your formula or description about "year". Are you
attempting to apply this across multiple years, or only for one year's
data?

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 pseudocode 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.

"warrio" wrote in message
...
Hi Jeff,
Thank you for having tried to understand my question. and sorry for not
making clear enough!
What I'm trying to calculate is chained year to date performance that
you calculate like:

First month: JanuaryPerf = X/(Y+Z)
Next month FebruaryPerf = (1 + JanuaryPerf) * (1 + (X/(Y+Z)))-1
Next month MarchPerf = (1 + FebruaryPerf) * (1 + (X/(Y+Z)))-1

It would have been easy to do it with a running sum if it was an
addition, but my desperate case, it's a product.
and I can't think of aggregate functions neither, because only the
addition is used whether in the sum or the avg function..

So what I'm doing now, because I haven't find an easier solution to it
in a query or a report is to calculate it in vba, store the result and
display them with the rest of info. unless you have a better advice

Thanks again






"Jeff Boyce" a écrit dans le message de news:
...
I can't tell from your description how you (and therefore, how Access)
determines "previous". You'll need to be able to define that in a way
that you can explain to Access.

If you are trying to build a "running sum" (again, not enough info in
your description), Access offers a Running Sum property for a textbox
control in a report definition.

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 pseudocode 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.

"warrio" wrote in message
...
Hi there,

In a detail section, is there a way to get the previous field value in
the previous record?
I'm asking this because each current is calculated with the previous
value. The first a simple calculation based on current values.

looks like recursive code, but how to do without vba?

Thanks in advance for any good suggestion











 




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 11:55 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.