[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

double underline

Posted on 2004-04-01
8
Medium Priority
?
1,268 Views
Last Modified: 2012-08-14
Hi, this sounds like a very stupid question, but I can't figure it out.  How does one double-underline a font in a report in Access?  I'm doing some reports for our accounting department and insist on two rather than one line.  Some of my totals text boxes need to display the results with two lines underneath.

I don't want to just draw an extra line, since the number length changes and a fixed length line would look lame.

Thanks for your help.

Mirek
0
Comment
Question by:drozdzowski
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 54

Expert Comment

by:nico5038
ID: 10733216
I'm afraid you'll have to use an extra line to mimic this as a textbox will only allow a single underline :-(
Another option might be to use an extra field and place as many "=" characters as characters in the number field....

Nic;o)
0
 
LVL 54

Expert Comment

by:nico5038
ID: 10733245
Hmm, an another alternative might be to use a Word Mailmerge to publish the report as a Word document and apply the double underline there.

Nic;o)
0
 

Author Comment

by:drozdzowski
ID: 10733277
word is not really and option.  the accounting people want the interface to all the reports simple (i.e. only one :).  is there a way to read the length of the string/number in  a text box and they apply that parameter to dynamically draw a horizontal line at run time?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 77

Accepted Solution

by:
peter57r earned 1200 total points
ID: 10733366
Hello drozdzowski,

This code will create double underlines which are as wide as the control.

It comes from an Access MVP called Duane Hookom.
.........................................
Create a function in a standard module:

Function MakeLines(rpt As Report)
    Dim ctl As Control
    Dim dblSpacing As Double 'space between double underline
    dblSpacing = 30
    For Each ctl In rpt.Controls
        If ctl.Tag = "bl" Then
            rpt.Line (ctl.Left, ctl.Top + ctl.Height)-Step(ctl.Width, 0)
        End If
        If ctl.Tag = "tl" Then
            rpt.Line (ctl.Left, ctl.Top)-Step(ctl.Width, 0)
        End If
        If ctl.Tag = "dbl" Then
            rpt.Line (ctl.Left, ctl.Top + ctl.Height)-Step(ctl.Width, 0)
            rpt.Line (ctl.Left, ctl.Top + ctl.Height +
dblSpacing)-Step(ctl.Width, 0)
        End If
    Next
End Function

Edit the tag property of the controls you want to mark. Use bl for bottom
line, tl for top line, and dbl for double bottom line. Then add this code to
the section containing the controls.

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
    Call MakeLines(Me)
End Sub
...................................................



Pete
0
 

Author Comment

by:drozdzowski
ID: 10733398
how do i make the size of the control (in this case textbox) change (width only) depending on the size of the number/string to be displayed?
0
 
LVL 54

Assisted Solution

by:nico5038
nico5038 earned 800 total points
ID: 10733410
The "easy" way is to use a non-proportional font like CcourierNew and use: len([fieldname]) to get the number of characters.
Now the line length can be set by multiplying that number with a constant value corresponding to the font width selected.

Using a proportional fonttype would require to count the number of different sized characters :-(

Idea ?

Nic;o)
0
 

Author Comment

by:drozdzowski
ID: 10733489
Thank you both.  I'll play with these suggestions now.

Mirek
0
 
LVL 54

Expert Comment

by:nico5038
ID: 10733581
I'm afraid that the control width won't help as it will always be the same width, not taking the filled part in account....

Nic;o)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question