Text Box between labels

gsrajan

Registered User.
Local time
Today, 18:54
Joined
Apr 22, 2014
Messages
227
Hi, I am placing bound text box between two labels. How to adjust the width of the text box dynamically based on the length of data in the text box. Can shrink or can grow property is not helpful. Please help. Thanks
 
On a Form? You can try to use code, but that means you'll also have to adjust the position of all the other controls to avoid overlaps. I suggest that design your Textbox to as wide or tall enough to fit as much data as possible rather than deal with the headache of getting the code right. When the content is too big for the control, you should see a scrollbar.
 
Thank you, not form, but report.
 
Thank you, not form, but report.
Okay, on Reports, growing is only vertical, not horizontal. Also, on reports, you're limited to the paper size plus margins. So, using code to widen a Textbox, you'll also need to worry about how far you've gone while also considering the size of all the other controls to the right and make sure they don't drop off. So, again, I suggest just designing the report to have controls to have as wide enough size to contain as much data as possible. You can then use Can Grow to show additional data below the first row of data.
 
Ok, thanks. Then I will try mail merge, not sure if it will work, never done. Thank you.
 
Ok, thanks. Then I will try mail merge, not sure if it will work, never done. Thank you.
There is a very easy and simple mail merge template available online. It might make your life easier.
 
If my guess at what you're doing is correct, you can mix fixed text (your labels) and data (your textbox). Try a textbox with a control source like:

="the text from the first label" & [Fieldname] & "text from the second label"

where Fieldname is the field you currently have in the textbox (its control source).
 
There is a very easy and simple mail merge template available online. It might make your life easier.
Thank you. If you know the link for the template, please let me know. Thank you.
 
If my guess at what you're doing is correct, you can mix fixed text (your labels) and data (your textbox). Try a textbox with a control source like:

="the text from the first label" & [Fieldname] & "text from the second label"

where Fieldname is the field you currently have in the textbox (its control source).
 
Hi pbaldy, Thank you, this is what I have been looking for. Thanks for your help. Have a good weekend.
 

Users who are viewing this thread

Back
Top Bottom