Display counter in report for UNIQUE RECORDS

Y

YOBOY

Cheers,

let's say we have a report based off a query, which would yield:


id Part no service performed
10 ASDF CLEAN
10 ASDF REPAIR
13 ÑLKJ CLEAN
13 ÑLKJ REPAIR

I know that if I have a textbox, and if I set the control source to =1 and
the runningsum property to over group it would give me a line number for each
record, ie

No id Part no service performed
1 10 ASDF CLEAN
2 10 ASDF REPAIR
3 13 ÑLKJ CLEAN
4 13 ÑLKJ REPAIR

However, I need it to be (for clarity reasons)

No id Part no service performed
1 10 ASDF CLEAN
10 ASDF REPAIR
2 13 ÑLKJ CLEAN
13 ÑLKJ REPAIR

and so on...

a "unique record counter" for the id field

any help would be greatly appreciated

thanks in advance.

Yoboy
 
J

John Spencer

I would try the following.

Add a group that groups on the ID and put textbox in the group with its
source as =1 and overall. Name the control txtCountID
Set the visible property of the Group to No

Add a control (txtShowCount) to the detail section that refers to
txtCountID as its source. Set the controls hide duplicates property to Yes.

I think that will work. If not, post back and we can try a variation on
this where you print the group header (with all the fields that are in
the detail for the first record) and don't print the first record in the
detail section for each group.


'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
Y

YOBOY via AccessMonster.com

Mate,

thanks for the reply,

Did as you suggested and.....

it worked!

hats off!.

Regards,

Yoboy

John said:
I would try the following.

Add a group that groups on the ID and put textbox in the group with its
source as =1 and overall. Name the control txtCountID
Set the visible property of the Group to No

Add a control (txtShowCount) to the detail section that refers to
txtCountID as its source. Set the controls hide duplicates property to Yes.

I think that will work. If not, post back and we can try a variation on
this where you print the group header (with all the fields that are in
the detail for the first record) and don't print the first record in the
detail section for each group.

'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
[quoted text clipped - 33 lines]
 
Y

YOBOY via AccessMonster.com

Sorry if this is taken as a double posting, just trying to clarify what my
mate John posted earlier:

"I would try the following.

Add a group that groups on the ID and put textbox in the group *HEADER* with
its
source as =1 and overall. Name the control txtCountID
Set the visible property of the Group *HEADER* to No"

Hope someone makes this a sticky, ;)

Regards,

Yoboy
Mate,

thanks for the reply,

Did as you suggested and.....

it worked!

hats off!.

Regards,

Yoboy
I would try the following.
[quoted text clipped - 22 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top