Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add Value to one record based on value of other record

Status
Not open for further replies.

pkohli8

Programmer
Oct 27, 2005
23
US
Hi,
I have a table that has following fields
field A, Field B, Field C(Time)

for example

Field A Field B Field C
102 Apple 3:00 AM
102 Orange 3:15 AM
102 Banana 4:00 Am
300 Grapes 1:00 AM
300 Berry 4:00 PM
401 Apple 1:00 AM
401 Grapes 3:00 AM

Now I need to Add another column say Field BB that displays previous value of Field B corresponds to same Field A

for example (Final result)

Field A Field BB Field B Field C
102 Apple 3:00 AM
102 Apple Orange 3:15 AM
102 Orange Banana 4:00 Am
300 Grapes 1:00 AM
300 Grapes Berry 4:00 PM
401 Apple 1:00 AM
401 Apple Grapes 3:00 AM

Please let me know if anybody knows how this can be done.

Thanks


 
Try a formula of:

if previous({table.fieldA}) = {table.fieldA} then
previous({table.fieldB})

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top