Re: Hide Line on Repeating Values

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



OK, if I understand you correctly, the code I gave you before will do the
job, you just need to put the line at the *top* of the detail section, not
the bottom.

"dsc2bjn" <dsc2bjn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:13F0D9B4-2CC6-4A47-856B-4007F3C1E2C8@xxxxxxxxxxxxxxxx
Yea...I did that.

The client I work for is a little ....(you fill in the blank).

They want the report to look basically like a spread***, but they only
want the Level 1 information to be displayed once on the report.

Example:

Tracking # | Description | Status | Corrective Action
_______________________________________________
|1 | Test1 | In Progress | Fix window |
| | | | Wash Car
|

| | | | Wash Dog
|
|______________________________________________|
|2 | Test2 | Completed | Paint Kitchen |
| | | | Dry Clothes
|

|__________|__________|____________|___________ |

I drew a line under each corrective action in the detail section and
placed
the other portion of the line in the Tracking number header. Since the two
lines aren't actually occuping the same space, the lines don't line up.

I thought by hiding the line periodically, I could accomplish what they
want.



"bcap" wrote:

Why don't you just group the report on Tracking Number, and have the line
(and only the line) in the group header (or the footer, if that works
better
for you)? Much easier than faffing around with code.

"dsc2bjn" <dsc2bjn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:38D902D2-532C-45CB-80EF-FDA779FD15D5@xxxxxxxxxxxxxxxx
Thanks!!!

That works exactly how I stated it.

I may have to re-think the logic behind this.

What I really need is a way to only draw the line when the Tracking
Number
value changes or said differently...only when it is the last record for
the
same Tracking Number.



"bcap" wrote:

Something like this I think:

Option Compare Database
Option Explicit

Dim mstrPrevTrackNumber As String

Private Sub Detail_Format(Cancel As Integer, FormatCount As
Integer)

Line60.Visible = ([Tracking Number] <> mstrPrevTrackNumber)

End Sub

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)

mstrPrevTrackNumber = [Tracking Number]

End Sub

Please note, I have assumed that [Tracking Number] is a string. You
will
need to change the code slightly if it's numeric.

"dsc2bjn" <dsc2bjn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:318F639E-D596-4089-B47E-433EA2B1C2D7@xxxxxxxxxxxxxxxx
I have a report which have set several values to "Hide Duplicates".

I have line under each row of data. I wish to hide the line if the
value
in
the previous record is repeated.

I plan on using the "On Format" for the report section to control
when
the
line is displayed using "Visible".

I have very limited experience with VB. How do I write in code the
command
that says, "If [Tracking Number] is equal to previous [Tracking
Number]
then
Line60.Visible=False
Else
Line60.Visible=True










.


Quantcast