Calculation between two records

B

Bob Waggoner

Thanks for all your help in the past - here I am again with another stumper
for me - but not for most of you. Thanks.

I have two records in the same table Record A and Record B - along with
Records C-Z but I want to calculate RecordB - RecordA = Difference.

How can I do that in a form.

Here's the kicker (for me) I'd like the Difference txtbox to show B-A when I
click on B and C-B when I click on record C, and D-C when I click on record
D.

Thanks for your help!
Bob
 
A

Allen Browne

You can use a subquery to get the difference between 2 records. Details:
http://allenbrowne.com/subquery-01.html#AnotherRecord

The meter-reading example (current value less previous reading) should be
relevant. But be aware that:
- the results will be read-only (i.e. you can't edit records in the form)
- the results won't adapt if you filter the form, or sort the records
differently.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top