Advertisement

01.07.2008 at 08:35AM PST, ID: 23063919
[x]
Attachment Details

How to write query in Access to compare value on current record to value on previous record?

Asked by jseneris in Access Coding/Macros

Tags: vba

Hi,

I'm writing a report in Access and I need to calculate a field that is based on a value on the current record minus the value on the previous record. Is there an easy way to do that?  I remember in Foxpro you could set a variable on the report form that could keep the value of the previous record.

I can write a subquery that will get the value from the previous record but to have each record run a subquery seems like it would be a huge performance drag.Start Free Trial
[+][-]01.07.2008 at 09:03AM PST, ID: 20600896

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.07.2008 at 07:23PM PST, ID: 20605727

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.08.2008 at 05:08AM PST, ID: 20608136

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.08.2008 at 05:09AM PST, ID: 20608142

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Access Coding/Macros
Tags: vba
Sign Up Now!
Solution Provided By: JimFive
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628