Text Box Middle Alignment (1 Viewer)

vorngsarorn

New member
Local time
Today, 15:18
Joined
Mar 7, 2024
Messages
10
Dear All,

Hi everyone,


I'm working on an Access report and I'm trying to achieve the same text formatting as I can in Excel. In Excel, I can easily wrap text and center it vertically within a cell. However, I can't seem to find a way to both wrap text and center text vertically in a text box within Access reports.


Is there a way to accomplish this in Access, or is there a workaround that would achieve a similar result?


Any advice would be greatly appreciated!


Thanks,
 

Attachments

  • Screenshot 2024-03-07 062633.png
    Screenshot 2024-03-07 062633.png
    33.7 KB · Views: 26

Jon

Access World Site Owner
Staff member
Local time
Today, 09:18
Joined
Sep 28, 1999
Messages
7,396
Welcome to Access World! We're so happy to have you join us as a member of our community. As the most active Microsoft Access discussion forum on the internet, with posts dating back more than 20 years, we have a wealth of knowledge and experience to share with you.

We're a friendly and helpful community, so don't hesitate to ask any questions you have or share your own experiences with Access. We're here to support you and help you get the most out of this powerful database program.

To get started, we recommend reading the post linked below. It contains important information for all new users of the forum:

https://www.access-programmers.co.uk/forums/threads/new-member-read-me-first.223250/

We hope you have a great time participating in the discussion and learning from other Access enthusiasts. We look forward to having you around!
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 01:18
Joined
Aug 30, 2003
Messages
36,125
Welcome. I moved your thread to a more appropriate forum.

Note to others, this is cross posted:


 

GPGeorge

Grover Park George
Local time
Today, 01:18
Joined
Nov 25, 2004
Messages
1,867
Dear All,

Hi everyone,


I'm working on an Access report and I'm trying to achieve the same text formatting as I can in Excel. In Excel, I can easily wrap text and center it vertically within a cell. However, I can't seem to find a way to both wrap text and center text vertically in a text box within Access reports.


Is there a way to accomplish this in Access, or is there a workaround that would achieve a similar result?


Any advice would be greatly appreciated!


Thanks,
What have you tried so far in your report in Access?

For example, Text alignment in controls on reports can be set to Left, Right or Middle. It seems like that addresses one of your concerns.
You can set Padding for controls, and other properties, including "Can Grow" and "Can Shrink" for controls in some report sections.

1709775688413.png


Have you tried any of those properties in your report?
 

vorngsarorn

New member
Local time
Today, 15:18
Joined
Mar 7, 2024
Messages
10
What have you tried so far in your report in Access?

For example, Text alignment in controls on reports can be set to Left, Right or Middle. It seems like that addresses one of your concerns.
You can set Padding for controls, and other properties, including "Can Grow" and "Can Shrink" for controls in some report sections.

View attachment 112952

Have you tried any of those properties in your report?
Dear Sir,
Yes I already done with all the method you have mentioned and it still not working.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:18
Joined
May 7, 2009
Messages
19,243
did you set the Address "Text Align" property to Center:


textAlign.png



then you just need to adjust the width of your textbox to achieve what you want.

textAlign2.png
 

vorngsarorn

New member
Local time
Today, 15:18
Joined
Mar 7, 2024
Messages
10
Thank you sir or your taking time in kind help on this matter.
I might confusing you of my bad English. my boss wants columns ID, Name, Sex and Date of birth remain in the mid align when the Address column is expand more than one row and in verse, all of these columns (ID, NAME, SEX, DOB,ADDRESS) stay in the mid align when columns Address is not expand. In Ms. Excel we can do this easily while in Access is very hard.
Screenshot 2024-03-07 062633 copy.jpg
 

Minty

AWF VIP
Local time
Today, 09:18
Joined
Jul 26, 2013
Messages
10,371
Simple alternative approach: Export it to Excel (in Access) and use Access to format it there ready for printing/viewing?

Access is poor at this type of formatting, and it wouldn't be rocket science for the Access development team to allow us better formatting especially in reports, but I won't be holding my breath...

Alternatively, you could count the characters in the address column and do some maths to work out how many lines it is on to then format the spacing for the other controls, but it s quite a lot of work just to look pretty.
 

vorngsarorn

New member
Local time
Today, 15:18
Joined
Mar 7, 2024
Messages
10
Simple alternative approach: Export it to Excel (in Access) and use Access to format it there ready for printing/viewing?

Access is poor at this type of formatting, and it wouldn't be rocket science for the Access development team to allow us better formatting especially in reports, but I won't be holding my breath...

Alternatively, you could count the characters in the address column and do some maths to work out how many lines it is on to then format the spacing for the other controls, but it s quite a lot of work just to look pretty.
Thank again sir and there is some suggestion that VBA may help but it's requires ton of work to accomplished it though.
 

Minty

AWF VIP
Local time
Today, 09:18
Joined
Jul 26, 2013
Messages
10,371
It would be relatively simple to automate the Excel formatting, just a few lines of code once the data was exported.
 

vorngsarorn

New member
Local time
Today, 15:18
Joined
Mar 7, 2024
Messages
10
It would be relatively simple to automate the Excel formatting, just a few lines of code once the data was exported.
Unfortunately, I'm blank to VBA. My job is too design a simple report but what he order is not simple.
 

Gasman

Enthusiastic Amateur
Local time
Today, 09:18
Joined
Sep 21, 2011
Messages
14,301
Excel has a macro recording option. That would give you a head start.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:18
Joined
May 7, 2009
Messages
19,243
the photo on post#6, is from a Report.

report.png
 

GPGeorge

Grover Park George
Local time
Today, 01:18
Joined
Nov 25, 2004
Messages
1,867
I think I finally get the problem. The OP wants the single line of text in the Name, Sex, and Date of Birth fields to move down to the middle of their respective controls when the Address control expands to two lines. NONE of the controls is otherwise aligned that way, including Address. The Address only has the appearance of being "Mid-Aligned" by virtue of the expanded height of the text box control.

Am I guessing that right, @vorngsarorn?
 

vorngsarorn

New member
Local time
Today, 15:18
Joined
Mar 7, 2024
Messages
10
I think I finally get the problem. The OP wants the single line of text in the Name, Sex, and Date of Birth fields to move down to the middle of their respective controls when the Address control expands to two lines. NONE of the controls is otherwise aligned that way, including Address. The Address only has the appearance of being "Mid-Aligned" by virtue of the expanded height of the text box control.

Am I guessing that right, @vorngsarorn?
Yes Sir,
 

Minty

AWF VIP
Local time
Today, 09:18
Joined
Jul 26, 2013
Messages
10,371
IMHO It's a feature that should have been available in forms and report formatting options for years.
 

Users who are viewing this thread

Top Bottom