Skip record when countingn (numbering)

  • Thread starter Thread starter Sammie
  • Start date Start date
S

Sammie

I have a report which numbers the detail records using a text box, control =1
and running sum over all. The report is generated by a form on which the
user numbers the items to control the order in which they appear in a number
field called [order]. If the item [order]= 0 , I want the record not to be
numbered on the report, in other words, I want the running sum to start with
the record whose [order]= 1 . Can anyone help me write the expression to do
this, and tell me where to put the expression? (on the report query, on the
report control?)
 
Sammie said:
I have a report which numbers the detail records using a text box, control =1
and running sum over all. The report is generated by a form on which the
user numbers the items to control the order in which they appear in a number
field called [order]. If the item [order]= 0 , I want the record not to be
numbered on the report, in other words, I want the running sum to start with
the record whose [order]= 1 . Can anyone help me write the expression to do
this, and tell me where to put the expression? (on the report query, on the
report control?)


Instead of just =1 use =Iff([Order] > 0, 1, 0)
and set the Format property to #
 
Beautiful! Thank you, Marsh. Follow-up question:
I want to format the field as in a numbered list. I put "#." in the format
property, but it ignores the dot. Desired effect:
1.
2. etc.
Can you help?
--
Thanks.
Sammie Access 2003


Marshall Barton said:
Sammie said:
I have a report which numbers the detail records using a text box, control =1
and running sum over all. The report is generated by a form on which the
user numbers the items to control the order in which they appear in a number
field called [order]. If the item [order]= 0 , I want the record not to be
numbered on the report, in other words, I want the running sum to start with
the record whose [order]= 1 . Can anyone help me write the expression to do
this, and tell me where to put the expression? (on the report query, on the
report control?)


Instead of just =1 use =Iff([Order] > 0, 1, 0)
and set the Format property to #
 
Sammie said:
Beautiful! Thank you, Marsh. Follow-up question:
I want to format the field as in a numbered list. I put "#." in the format
property, but it ignores the dot. Desired effect:
1.
2. etc.


Instead of #, you'll need a more complete format. I think
this should add a dot dor non-zero values:
0\.;;""
 
Back
Top