Vba – How to bottom-align string in Access report textbox


Using Access 2003. On a subreport I have arranged a row of text boxes that will be populated with dynamic data. (These will appear as column headers on a master report.) Due to report constraints, the text boxes are tall and somewhat thin; some incoming strings will be longer than other strings; strings are expected to wrap when necessary. Presently, each of these text boxes is bottom-aligned.

What I am looking for is a way to force the text in each of these boxes to be bottom-aligned, to grow upward as it were. As we know, Excel natively allows bottom alignment in a cell; I do not see that Access offers a similar capability. Any hints? A VBA technique maybe? Thanks.

Best Solution


You can use VBA to set TopMargin property of each textbox to a certain value; TopMargin will "move" text down towards the bottom. You will have to calculate each TopMargin based on how many characters including spaces fit in one line of each textbox. Not a great solution, but may work.

I don't think there is a configuration option in Access for bottom text alignment. See this: http://www.eggheadcafe.com/software/aspnet/35318427/how-can-i-bottom-align-te.aspx

Related Question