Solved

Access Guage Control

Posted on 2000-03-15
8
287 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

867 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

16 Experts available now in Live!

Get 1:1 Help Now