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

Checking numeric sequence - How can I? 1

Status
Not open for further replies.

keijen

Programmer
Jul 12, 2001
16
AU
The client 1-M data, on the many side, has fields numbered sequentially from one, but this data is user-entered and errors in sequence may occur.
I need to determine if, within a grouping on a sub report, all child records are in sequence from 1 up to the end of child data set. I'll send the result back to the parent record in the report in case of missing sequence.

I don't know how to check for sequence. The number of records will be unknown.
The data is coming sorted by the field I want to check.

Anyone able to throw me a clue on a formula that can help me?

TIA
keijen
 
You may be able to use the Previous() function in this case.

if Previous({table.field}) <> {table.field} then
do whatever processing you need to capture the value

~Brian
 
You could try something like:

if next({your.numberfield}) - {your.numberfield} > 1 then &quot;gap&quot; else &quot;consecutive&quot;

-LB
 
I don't know what I was thinking. Don't follow my post, its wrong; lbass is on the right track. I guess that is what I get for replying to posts after 11:00 pm. :)
~Brian
 
Thanks - I will spend a night reading the functions list!

keijen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top