473,386 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to Set Vertical Text in Access?

132 100+
Hi!
Vertical text when placed in a report is read from top to bottom,
is it possible to have vertical text so it's read from bottom to top
(rotated 180 degrees from the default)?
Example.
I am working with 2010. In the report if you select yes in the properties for vertical it does place it Vertical.
However, it places text so the bottom of the text aligned with the
left edge of the paper; my question is,
Is there a way to align it with right edge of the paper?
ie. I want the word HOME to read like
Expand|Select|Wrap|Line Numbers
  1. E
  2. M
  3. O
  4. H  this is Bottom to top
  5.  
  6. and Not like
  7. H
  8. O
  9. M
  10. E   this is top to bottom, ofcourse with the text aligned 90degree
  11.  
IS this possible in access?
Please help!!!!
Dec 25 '10 #1

✓ answered by ADezii

The key to making this work, and look presentable, is to:
  1. Set the Can Grow Property of the Text Box displaying the Vertical Text ([txtLNameVer]) to Yes.
  2. Using a Fixed Width Font for the Text Box displaying the Vertical Text, in this case I used Courier New.
  3. The Code in the Format() Event will do the rest of the work in displaying the Text in Reverse, Vertical Format, for the [LastName] Field.
  4. Download the simple Attachment that I have created for you to see all this in action.
  5. The Code the Detail_Format() Event is as follows:
    Expand|Select|Wrap|Line Numbers
    1. Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    2. Dim strLast As String
    3. Dim intCtr As Integer
    4. Dim strBuild As String
    5.  
    6. strLast = Me![LastName]
    7.  
    8. For intCtr = Len(strLast) To 1 Step -1
    9.   strBuild = strBuild & Mid$(strLast, intCtr, 1) & vbCrLf
    10. Next
    11.  
    12. Me![txtLNameVer] = Left$(strBuild, Len(strBuild) - 2)
    13. End Sub

7 7141
ADezii
8,834 Expert 8TB
As a last resort, you can accomplish this with Code in the Format() Event of the Detail Section. If you are interested, let me know and I'll Post the Code.
Dec 25 '10 #2
Mr Key
132 100+
Yes indeed I am!
With any cost!!!
Dec 25 '10 #3
ADezii
8,834 Expert 8TB
The key to making this work, and look presentable, is to:
  1. Set the Can Grow Property of the Text Box displaying the Vertical Text ([txtLNameVer]) to Yes.
  2. Using a Fixed Width Font for the Text Box displaying the Vertical Text, in this case I used Courier New.
  3. The Code in the Format() Event will do the rest of the work in displaying the Text in Reverse, Vertical Format, for the [LastName] Field.
  4. Download the simple Attachment that I have created for you to see all this in action.
  5. The Code the Detail_Format() Event is as follows:
    Expand|Select|Wrap|Line Numbers
    1. Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    2. Dim strLast As String
    3. Dim intCtr As Integer
    4. Dim strBuild As String
    5.  
    6. strLast = Me![LastName]
    7.  
    8. For intCtr = Len(strLast) To 1 Step -1
    9.   strBuild = strBuild & Mid$(strLast, intCtr, 1) & vbCrLf
    10. Next
    11.  
    12. Me![txtLNameVer] = Left$(strBuild, Len(strBuild) - 2)
    13. End Sub
Attached Files
File Type: zip Vertical.zip (19.4 KB, 350 views)
Dec 25 '10 #4
Mr Key
132 100+
Thanks!
I couldnt open the db,
Give me the meaning of each applied code, line by line and word by word for the sake of learning so that I can play with.
You may start from
Expand|Select|Wrap|Line Numbers
  1. For intCtr = Len(strLast) To 1 Step -1
  2.   strBuild = strBuild & Mid$(strLast, intCtr, 1) & vbCrLf
  3. Next
  4.  
  5. Me![txtLNameVer] = Left$(strBuild, Len(strBuild) - 2)
  6. End Sub
I have tried to learn on my own but couldnt make it.
Thanks!!!
Dec 25 '10 #5
ADezii
8,834 Expert 8TB
  1. Starting at the end of the String, and ending at the beginning, read each character, add it to a pre-existing String (strBuild), then add a CR/LF (Carriage Return/Line Feed) after each character so that they appear on different lines.
    Expand|Select|Wrap|Line Numbers
    1. For intCtr = Len(strLast) To 1 Step -1 
    2.   strBuild = strBuild & Mid$(strLast, intCtr, 1) & vbCrLf 
    3. Next 
  2. Strip the Trailing CR/LF from the String (strBuild) that has been built, and assign this Value to the Text Box Control ![txtLNameVer] that will contain this String which will be the Last Name for each Record in Reverse, Vertical order.
    Expand|Select|Wrap|Line Numbers
    1. Me![txtLNameVer] = Left$(strBuild, Len(strBuild) - 2) 
  3. I cannot understand why you cannot Open the Demo Database, what Error are you getting when you try to do so?
Dec 26 '10 #6
Mr Key
132 100+
Thanks alot! Finally I got the point and it works!
Thanks
Dec 26 '10 #7
ADezii
8,834 Expert 8TB
You are quite welcome.
Dec 26 '10 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Joop | last post by:
Does anybody know a way to print a vertical text field spread over more detail lines? regards Joop
1
by: Rocketman | last post by:
Can you have Horizontal and Vertical text in a Textbox or RichTextbox and can u have both together.
1
by: James Dean | last post by:
Can you make vertical text in a richtextbox or is there any way around this like make the string vertical outside the textbox then try to paste it in that way into the textbox?.... *** Sent...
0
by: Stephen Muecke | last post by:
I use the following code to draw vertical text in an ownerdrawn StatusBar The text is drawn top to bottom. Is there a way to have the text drawn bottom to top? Stephen Private Sub...
5
by: Stan McCann | last post by:
Is there a way, or does anyone know if maybe in CSS3, there is a plan to implement vertical rotated text? At http://alamo.nmsu.edu/roundup/schedule.html, in the information I was provided,...
2
by: marss | last post by:
The text for the chart Y-axis title is to be drawn vertically. Here is the snippet of my code. ..... StringFormat drawFormat = new StringFormat(); drawFormat.FormatFlags =...
0
MSeda
by: MSeda | last post by:
I want to use vertical text on a report, but I want the top oriented to the left and Access's verticle text property automatically orients the top to the right. Is there any way to change this.
4
by: umlv | last post by:
Hi, I have a question about vertical text property for labels. I have set several labels to show vertical text on one of my forms. I had no problems with them on my desktop computer. Now I...
4
by: marfola | last post by:
I'm trying to implement bottom-to-top vertical text using CSS attributes in IE : writing-mode: tb-rl; filter: flipv fliph; But I have encountered the following: the text is...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.