Automatic Sequential Numbering

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

I use a database to track inspection data and part of it is used to
dynamically print out checklist items that the inspector chooses to be on the
checklists.

Each checklist contains different sections, such as section a, b, c, etc.
Each section could contain a different number of checklist items.

What I want to do on my checklist report is to have a textbox that
sequentially numbers each item in that section.

For example, section a has ten items that would be numbered 1, 2, 3,...10.
Section b has five items numbered 1, 2, 3, 4, 5. If I remove item that was
number 3 from section b. The next checklist for section b won't be printed
with the numbering of 1, 2, 4, 5 but with the numbering of 1, 2, 3, 4.

In otherwords how do I get a textbox on the detail section of the report to
display the sequential number of each checklist item within each section and
then start over at '1' when a new section occurs. The report is grouped by
section and I'm using Access 2007.

Thanks
Dan
 
Dan,

Try putting something like this in the query that is tied to the proper
section. It is important that the query be sorted by the Autonumber/Primary
Key in ascending order.

Sequence: DCount("*","tblCheckList","[CheckListID]<" & [CheckListID])+1

Jack Cannon
 
In otherwords how do I get a textbox on the detail section of the report to
display the sequential number of each checklist item within each section and
then start over at '1' when a new section occurs. The report is grouped by
section and I'm using Access 2007.

Put a textbox on the detail section with a Control Source

=1

Set its "Running Sum" property to "Over Group".
 
Back
Top