Hide duplicates

D

dsc2bjn

I have a database which I wish to supress repeating values. The Hide
Duplicates feature won't work, because it hides the duplicate even when the
record parent changes.

Example:

AU # AU Function # Function
--------------------------------------
1 this 1 that
2 sometimes
2 dog 1 cat
3 chicken

As you see there should be a 1 in the listing for AU #3; however, Hide
Duplicates keeps this from showing.

I want the values to show if the AU # is not the same as the one above.

Any suggestions are greatly appreciated.
 
D

dsc2bjn

If I do that, then every row will show the function number.

I tried using some VB code in the OnFormat for the Detail section, but it
doen't work like I want it to display:

If Me.[ID].IsVisible Then
FunctionOrder.Visible = True
Else
FunctionOrder.Visible = False
End If

This hid the Function # on the rows where the ID was displayed (just the
opposite of what I want to do).

I tried reversing the code:
If Me.[ID].IsVisible Then
FunctionOrder.Visible = False
Else
FunctionOrder.Visible = True
End If

This displayed the Function # for the first occurance and hid the Function #
correctly for 2nd occurance; however, it repeats the number for every other
row thereafter.
 
D

dsc2bjn

I am fairly close. I changed the VB from the detail OnFormat to the Print:

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

If Me.[ID].IsVisible Then
FunctionOrder.Visible = True
Else
FunctionOrder.Visible = False
End If
End Sub

Now I need to evaluate the ID from the previous record's ID. If they match
make it visible and if they don't match hide the value.

As it is now...the Function # is hidden within the same AU #.

Example:
AU # AU Function # Function
1 dog 1 chases the cat
barks at strangers
2 cat 1 licks its paws

In this case there should have been a number 2 by barks at strangers.

Suggestions?



dsc2bjn said:
If I do that, then every row will show the function number.

I tried using some VB code in the OnFormat for the Detail section, but it
doen't work like I want it to display:

If Me.[ID].IsVisible Then
FunctionOrder.Visible = True
Else
FunctionOrder.Visible = False
End If

This hid the Function # on the rows where the ID was displayed (just the
opposite of what I want to do).

I tried reversing the code:
If Me.[ID].IsVisible Then
FunctionOrder.Visible = False
Else
FunctionOrder.Visible = True
End If

This displayed the Function # for the first occurance and hid the Function #
correctly for 2nd occurance; however, it repeats the number for every other
row thereafter.

KARL DEWEY said:
Turn off the hide duplicates for the Function field text box in the report.
 
E

estrellita

dsc2bjn said:
I am fairly close. I changed the VB from the detail OnFormat to the Print:

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

If Me.[ID].IsVisible Then
FunctionOrder.Visible = True
Else
FunctionOrder.Visible = False
End If
End Sub

Now I need to evaluate the ID from the previous record's ID. If they
match
make it visible and if they don't match hide the value.

As it is now...the Function # is hidden within the same AU #.

Example:
AU # AU Function # Function
1 dog 1 chases the cat
barks at strangers
2 cat 1 licks its paws

In this case there should have been a number 2 by barks at strangers.

Suggestions?



dsc2bjn said:
If I do that, then every row will show the function number.

I tried using some VB code in the OnFormat for the Detail section, but it
doen't work like I want it to display:

If Me.[ID].IsVisible Then
FunctionOrder.Visible = True
Else
FunctionOrder.Visible = False
End If

This hid the Function # on the rows where the ID was displayed (just the
opposite of what I want to do).

I tried reversing the code:
If Me.[ID].IsVisible Then
FunctionOrder.Visible = False
Else
FunctionOrder.Visible = True
End If

This displayed the Function # for the first occurance and hid the
Function #
correctly for 2nd occurance; however, it repeats the number for every
other
row thereafter.

KARL DEWEY said:
Turn off the hide duplicates for the Function field text box in the
report.
--
KARL DEWEY
Build a little - Test a little


:

I have a database which I wish to supress repeating values. The Hide
Duplicates feature won't work, because it hides the duplicate even
when the
record parent changes.

Example:

AU # AU Function # Function
--------------------------------------
1 this 1 that
2 sometimes
2 dog 1 cat
3 chicken

As you see there should be a 1 in the listing for AU #3; however,
Hide
Duplicates keeps this from showing.

I want the values to show if the AU # is not the same as the one
above.

Any suggestions are greatly appreciated.
 

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

Similar Threads


Top