CanGrow event intercept

D

Davids

Hi!

It's possible to intercept the text box event CanGrow in to a report when
the text box is in two pages (at the end of the first and at the start of
the second)?

Thanx!

Davids
 
M

Marshall Barton

Davids said:
It's possible to intercept the text box event CanGrow in to a report when
the text box is in two pages (at the end of the first and at the start of
the second)?


No, but there are quite a few other things that can be done.

If you'll explain what you're trying to accomplish, maybe
someone will be able to make a constuctive suggestion.
 
D

Davids

Ok...
I must print a report with 2 text box for each record: the first is a
description of a product and the second is its price.
The description have the can grow property equal to TRUE because it's not
fix and the price must be printed aligned at the bottom of the description.
If the description is splitted in two pages, I have 2 text boxes with
partial description and for each partial description (at the end of the
first page and at the start of the second page) i have the price, but I want
print the price only where the description is terminated: aligneg at the
bottom of the partial description in the second page.
This is my problem...
Thanx in advance!

Davids
 
M

Marshall Barton

Davids said:
I must print a report with 2 text box for each record: the first is a
description of a product and the second is its price.
The description have the can grow property equal to TRUE because it's not
fix and the price must be printed aligned at the bottom of the description.
If the description is splitted in two pages, I have 2 text boxes with
partial description and for each partial description (at the end of the
first page and at the start of the second page) i have the price, but I want
print the price only where the description is terminated: aligneg at the
bottom of the partial description in the second page.


You can easily get the price just below the bottom of the
text box by positioning its Top at the bottom of the can
grow text box.

If you have to position the price info beside the bottom of
the can grow text box then you can use a different approach.
Make the price text box invisible, then use the report's
Print method in the section's Print event:

With Me.txtPrice
Me.Font = .Font
Me.FontSize = .FontSize
Me.FontBold = .FontBold
Me.CurrentX = .Left
Me.CurrentY = Me.txtDescription.Top _
+ Me.txtDescription.Height - .Height
Me.Print .Value
End With
 
D

Davids

Hi Marsh...
I have made exactly as you have written, but the result is what I have
described to you previously:
the price is printed two times...
Therefore the way that you propose does not turn out practicable.
You have other proposals?

Thanx...
Davids
 
M

Marshall Barton

Davids said:
I have made exactly as you have written, but the result is what I have
described to you previously:
the price is printed two times...
Therefore the way that you propose does not turn out practicable.
You have other proposals?


Well, aside from a couple of minor details, I can't get the
code I posted to fail. Here's the essence of the code I
used in my test:

With Me.txtPrice
Me.FontName = .FontName
Me.FontSize = .FontSize
Me.FontBold = (.FontBold = 1)
Me.CurrentX = .Left
Me.CurrentY = Me.txtDescription.Top _
+ Me.txtDescription.Height - .Height
Me.Print .Value
End With

The only thing I didn't like about it was that the Price
value was not right aligned.

Maybe there's something fundamentally different about your
layout that I'm not aware of. Perhaps if you'll provide
more details about the section, it's controls and their
positions, I'll be able to figure out why we're getting
different results.
--
Marsh
MVP [MS Access]


 

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