Duplicate Counts

S

Susan123

Hi,
In searching for answers to duplicates, I found a post from 2008 (please see
below). It was exactly what I was looking for. I followed the instructions
but I get a yellow highlight on Me.txtOrderCount = intIDCount when I try
running the code. I have very little knowledge of code and not sure what I
am doing wrong. Can someone please guide me so I can get this working? I
truly appreciate any help given.


Duane's solution should work with your daily report, but if you are first
 
D

Daryl S

Sue -

Are you getting an error message? If there is no error message, and you are
just getting the yellow highlight, then it probably just a ghost breakpoint.
You should be able to get rid of it by re-compiling the code (and maybe close
and re-open Access).

If there is an error message, then please let us know what it says so we can
help.
 
K

KenSheridan via AccessMonster.com

Sue:

One of my old posts coming back to haunt me!

Just to be absolutely clear, the lines:

Dim strIDList As String
Dim intIDCount As Integer

go in the 'declarations' area of the report's module. This makes the
variable available throughout the module.

The lines:

If PrintCount = 1 Then
If InStr(strIDList, "~" & Me.OrderID) = 0 Then
strIDList = strIDList & "~" & Me.OrderID
intIDCount = intIDCount + 1
End If
End If

go in the Print event procedure of the detail section.

And the line:

Me.txtOrderCount = intIDCount

goes in the Print event procedure of the report footer.

Is it possible that you either haven't added the txtOrderCount text box to
the footer, or have added a text box to the footer with a different name to
that used in the code?

Ken Sheridan
Stafford, England
Hi,
In searching for answers to duplicates, I found a post from 2008 (please see
below). It was exactly what I was looking for. I followed the instructions
but I get a yellow highlight on Me.txtOrderCount = intIDCount when I try
running the code. I have very little knowledge of code and not sure what I
am doing wrong. Can someone please guide me so I can get this working? I
truly appreciate any help given.

Duane's solution should work with your daily report, but if you are first
grouping the weekly report by days then the same OrderID could appear in more
than one group header if picked and loaded on separate days as this would be
[quoted text clipped - 39 lines]
Ken Sheridan
Stafford, England
 

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