Solved

Access Guage Control

Posted on 2000-03-15
8
286 Views
Last Modified: 2008-03-10
I'm trying to find, buy, etc. a control that would behave the same way that the Progress Control (Active X component comctl32.ocx) works but I would like to use it as a text box type control. I would like to create a form with a tabular type of layout based on a query that will eventually display multiple lines for each of the rows in the query, from those rows I would like to create a progress type control on each line that would indicate the percent of utilization. I would like to find an Active X control that would allow me to simply provide the control with the data value and then for every line it would generate the guage control. Has anyone every seen anything like this for Access 97. Thanks in advance for your help.
0
Comment
Question by:t120052
  • 4
  • 2
  • 2
8 Comments
 
LVL 9

Accepted Solution

by:
BrianWren earned 200 total points
ID: 2620243
You can do this with just Access controls...

Write a query that has a field whose number of characters is based on a calculation of the field that you want to show progress for.

Use that query as the recordSource for your form.

Create a text box, and make it's control source the calculated field.

The character to use is font Terminal, character 'Û' (Alt+0219), which completely fills its character position.

Brian
0
 
LVL 9

Expert Comment

by:BrianWren
ID: 2620293
I have a sample DB I could mail you . . .
0
 
LVL 1

Expert Comment

by:EvanL
ID: 2620680
I've got a good one that uses no extra queries, modules, or ActiveX controls.  Just a subform, and a few lines of code.  I can email you this one as well.
0
 
LVL 9

Expert Comment

by:BrianWren
ID: 2620700
Turns out that queries are not nec.  (Didn't use one in my sample DB.)

You can set a TextBox to

    =String([Field Whatever], "Û")

Brian
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 1

Expert Comment

by:EvanL
ID: 2620720
Brian's idea is excellent.  Just tried it and it works well for a gauge type thing.  The sample I have is better for showing the actual motion from 0 to X, X being the current value.
0
 

Author Comment

by:t120052
ID: 2621378
It appears to work as directed by Brian, but I wasn't able to use the =String([Field Whatever], "Û") character because it would simply print
Û characters. I substituted the character "+" and that worked fine. Is the display problem because I don't have "terminal " fonts installed?
 
0
 
LVL 9

Expert Comment

by:BrianWren
ID: 2621450
The terminal font might not be showing.

Select the textbox that is to serve as the gauge, then in the Font drop-down, type in Terminal, and hit <Enter>.

It's often there, even when not shown.

The format of String() is

 String(number, character)

Help's example shows:

   MyString = String(5, "*")   ' Returns "*****".
   MyString = String(5, 42)     ' Returns "*****".

So you could use

   String([Field Whatever], 219)

[Field Whatever] must be something that evaluates to a number, so that it satisfies the requirements of the String Function.

Get back to me on what typing in 'Terminal' did, after changing back to the Û character.

Or let me send you this sample...

Brian
0
 

Author Comment

by:t120052
ID: 2624481
Excellent suggestion! Many thanks...
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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.

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now