Access Detail Report Formatting

  • Thread starter Thread starter Pace
  • Start date Start date
P

Pace

Hi,

Using Access XP I have a report. Now this report is used for quoting. I have
written a new fancy text generation tool which is required by my company.

Now my reports products, dont always have a generated description available.
When this is the case there is a routine which obtains a different
description.

As I cant change a bound text box at runtime, I have an unbound box, over
the generated text box which is not visible by default.

When running through the format for each product, if the generated desc is
not available, my unbound box gets its data and is then set to visible.

The problem I have is that I only want to show this non generated desciption
for the product that it cant find one for. Whats happening is when the
unbound bx gets set to visible, its visible over all the products. I just
wanted to show it for the product it was detailing for.

I hope this breakdown is understandable.

ProdA - Generated

ProdB - Generated

ProdC - NonGenerated

So I only want to show my unbound box for C... whats happening is its
showing the text it obtained for C over A, B and C as well as the generated
for A & B ... I would like A + B to be as they were generated, and only show
the non generated on C.

The code is fine as it all works, its just this detail formatting issue I am
having. Here is a picture which might help clear things up. As you can see, C
is appearing many times, I only want it to appear at the bottom. There is a
hide duplicates option, however it puts C over A then.

Here was me thinking that the detail format just ran down the list, that
would be too logical no Anyway any help on this would be immensely
appreciated.

Picture url; http://i249.photobucket.com/albums/gg212/paceygb/exFormat.jpg
 
It would help if you posted the code.

I suspect that you are not setting the control with the generated
description back to NOT visible when it is not required.

Something like

IF IsNull(Me.txtDescription) = True Then
Me.GeneratedDescription.Visible = True
ELSE
Me.GeneratedDescription.Visible = False
End If

Even shorter
Me.GeneratedDescription.Visible = Len(Me.txtDescription & "") = 0


--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
John!

Thank you so much. Your solution worked perfectly thanks. I must learn this
though as I have been programming for a while.

By my logic,

IF CantGenerate = True
DO This
END IF

diddnt work (correctly as I expected)
however your logic.
IF CantGenerate = True
DO This
ELSE
Dont
END IF

Did work. I have never thought about things programatically this way as I
thought my initial if was handling the situation. Obviously I was wrong!

Thanks for your help. Really appreciated.
Barry
 
Back
Top