Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Blanking out SECOND occurance of duplicate 2

Status
Not open for further replies.

LARiot

Programmer
Feb 7, 2007
232
Hi,

I have a small problem. Thanks in advance for any help. I have a report for which there are (and should be) duplicate dates. It shows a difference in scores, first is the month previous to the survey and the second is three months after the survey. I need the 3 month later dates to be blanked on the first occurance. Ie:

I need:
Dlr Code Dealer Visit 1 PREVMO Visit 3 3MOLATER Facility
-----------------------------------------------------------
02041 Springs 3/28/06 02_2006 6/29/06 09_2006 75.73
02041 Springs 3/28/06 02_2006 6/29/06 09_2006 88.73

to read as:
Dlr Code Dealer Visit 1 PREVMO Visit 3 3MOLATER Facility
-----------------------------------------------------------
02041 Springs 3/28/06 02_2006 75.73
02041 6/29/06 09_2006 88.73

In the report I already have the second occurance of visit 1 hiden with changing the hide duplicates property in the reports. How can I hide the first occurance of Visit 3?

Thanks again,
-Nima
 
Here is something you can start with. The success of it will depend on some grouping issues. If you have the report grouped on the DirCode, the field represented by 02041, then you can add a textbox to the report in that group. Set the control source to =1, the Running Sum property to over group, and the visible property to No. Then in the Format event for that group put something like this.

If Me.RunningSumtextbox = 1 Then
Me.Visit3.Visible = False
Me.3MOLATER.Visible = False
Else
Me.Visit3.Visible = True
Me.3MOLATER.Visible = True
End If

That should do what you need.


Paul
 
Thanks Paul,

I tried that and the only thing it did was to blank out the first two occurances of the Visit 3 fields.

After the first record it shows them all.

What could I be doing wrong?

Thanks.
 
BTW, I set the visible property of RunningSum to true to see what it looked like and it just incremented meaning that only very first Dlr Code (both dates) were set to 1.

I'm wondering if I should be grouping on record level (ie the remaining fields).

Thanks.
 
I'm sorry, I made a mistake in my explanation earlier.
You should have a Dir Code Group Header with the Dir Code in it, and the rest of the info is in the Detail section including your counter textbox. That's where my first explanation was wrong. Then, you should see the counter reset itself with each group. Then put the If statement in the Format event for the Detail Section. Now, if you want your data to look exactly like you showed it in your example, you can add another textbox in your Detail section that has the Dir Code as the control source, and set the Visible property of the Dir Code textbox in the Group Header to No. That should give you the appearance you have in your example.
Sorry for the mistake.

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top