开发者

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. (开发者_如何学JAVAThese 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.


TonBill,

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


Since its a report. Check out the CanGrow property

If you have the text bottom aligned, just set the CanGrow Property for all the textboxes, and the textbox will dynamically grow to fit the text in the report.

Here is some info on the CanGrow property: http://msdn.microsoft.com/en-us/library/bb242179.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜