"Formula" In a Database

C

carl

My database records look column a,b,c:

Date Time Code Difference
20060428 93155 53
20060428 93155 85 32
20060428 93157 86 1
20060429 93159 54 -32
20060429 93159 55 1
20060429 93205 87 32
20060429 93205 88 1

I am trying to create the field "Difference" which is the subtraction of the
preceeding record for field "Code".

Is this possible in Access ?
 
F

freakazeud

Hi,
as a general rule we do NOT want to store calculated values in tables.
HTH
Good luck
 
C

carl

Thank you. I do not need to store the value. I need it to filter on.

I am trying to pull out all records where the "Difference" is not equal to 1.

Is this possible in Access ?
 
G

gee664

if your table has an incremental autonumber id field, you could create
views based on the (id - 1) and and then join the 2 views in another
view to calculate the difference and spit out the records you want..

or

you can use vba.
 
S

Steve Schapel

Carl,

It is possible to compare the value of a field with the value in the
same field in the "previous" record - so long as there is a data-based
way to determine which is the previous record. In the sample data you
gave, this does not appear to be the case, as there are duplicate data
on both the Date and Time fields.
 

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

Similar Threads

Comparing Two Adjacement Records 1
Lookup 3
Number Match Formula? 7
help 1
Sumif 8
Copying records that contain nulls 2
Reference - Vlookup 1
Conditional Datalabel formating 2

Top