fixed textbox in report (1 Viewer)

basilyos

Registered User.
Local time
Yesterday, 19:15
Joined
Jan 13, 2014
Messages
252
i have a report

in the details section i have for text boxes
3 text boxes one above the others
txt1(can grow)
txt2(can grow)
txt3(can grow)

and in the bottom of the details i put the last textbox it's date
txt4

my problem is when the txt1, txt2, txt3 grow to fit the text the txt4 go down

i want txt4 to be fixed

any solution?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 10:15
Joined
May 7, 2009
Messages
19,242
of course it will go down.
if you want it fix, then make
the other 3 textbox fix (cangrow=No).

what is it with txt4 that you want it
to be in same position, are there
other textbox, labels that should
be aligned to txt4?
 

basilyos

Registered User.
Local time
Yesterday, 19:15
Joined
Jan 13, 2014
Messages
252
of course it will go down.
if you want it fix, then make
the other 3 textbox fix (cangrow=No).

what is it with txt4 that you want it
to be in same position, are there
other textbox, labels that should
be aligned to txt4?

i can't make txt1,txt2,txt3 (cangrow=no)
the data will differ but the txt4 i want to show the date so i want to put it in the bottom far from the texts but in fix position
 

Minty

AWF VIP
Local time
Today, 03:15
Joined
Jul 26, 2013
Messages
10,371
Try putting it in either a page or report footer separate from the detail.
 

Minty

AWF VIP
Local time
Today, 03:15
Joined
Jul 26, 2013
Messages
10,371
If you want it appear in a position relative to the other boxes it can be done but it's complicated.

You need to look into the Top,Width,Left and Height properties of your growing textboxes, and set offsets to them in the On Format or On Print events.
Google will help you with some examples, it will take some considerable fiddling with to get right.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 10:15
Joined
May 7, 2009
Messages
19,242
you can try to add an unbound textbox (txtConcat)
this will hold text1, text2 and text3 together.
therefore it is a replacement for those
three textboxes.
adjust its width and height.
set its CanGrow property to No.
now create a function in your report to
concatenate the three textboxes.


Code:
Public Function conCat(ParamArray p() As Variant) As String
    Dim v As Variant
    For Each v In p
        conCat = conCat & v & vbCrLf
    Next
    conCat = Left(conCat, InStrRev(conCat, vbCrLf))
End Function

you can then remove the three textboxes.

set txtConCat textbox's Control Source to:

=conCat([Text1],[Text2],[Text3])
 

Users who are viewing this thread

Top Bottom