Solved

Access Guage Control

Posted on 2000-03-15
8
288 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
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.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

776 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