Solved

Access Guage Control

Posted on 2000-03-15
8
291 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
[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
  • 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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
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
 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Suggested Solutions

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

710 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