Report Autonumber

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I Am trying to build a report that may have several entries for each individual parts to be listed. My question is how do I create a sequential counter that will restart at zero for each part. For exampl

Lets say that my query generates 3 entries for part AM00001 and 5 entries for part AM00002, I want my report to generate
AM00001-
AM00001-
AM00001-
AM00002-
AM00002-
AM00002-
AM00002-
AM00002-

Does this need to be done directly in my query

Thanks in advance

Daniel
 
Daniel said:
I Am trying to build a report that may have several entries for each individual parts to be listed. My question is how do I create a sequential counter that will restart at zero for each part. For example

Lets say that my query generates 3 entries for part AM00001 and 5 entries for part AM00002, I want my report to generate:
AM00001-1
AM00001-2
AM00001-3
AM00002-1
AM00002-2
AM00002-3
AM00002-4
AM00002-5

Does this need to be done directly in my query?

No. It could be done in a query, but it's much easier in
the report.

First use the Sorting and Grouping window (View menu) to
create a group with header on the part field. (The group
header section doesn't have to have anything in it if you
don't have a use for it.)

Now, create a text box named txtLineCounter in the detail
section, set its control source expression to =1 and its
Running Sum property to Over Group.

With all that in place, your part text box can use an
expression like:

=[partfield] & "-" & txtLineCounter

Just make sure the part text box has a different name from
the partfield.
 
Marshall

I get numbers but they do not start over for each new part number. Any ideas

Daniel
 
Marshall,

I fiddled with it a bit and found out that I had made a mistake.

After all, your explanations work just fine!

Thanks once again

Daniel
 
Back
Top