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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

select record based on value of previous record?

Status
Not open for further replies.

dido

Programmer
Sep 27, 2002
9
GB
does anyone know how to select a record based on the value of a previous record in the table.
So if records where numbered 1,2,3,4,5,..... can I select a field for record 5 if the value of that field for record 4 is a certain value.
EXAMPLE
No. Name
1 river
2 tree
3 house

Show the field 'house' if the value of the the record with (No. - 1) = tree.

Select Where does not seem to work with formulas!
 
You could enter in the Suppress attribute of the detail section the following expression:
------------------------------
Previous({field_name})<>&quot;tree&quot;
------------------------------

hth,
- Ido CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Thank you so much! I didn't know about that function and it works a treat.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top