DataBase - Bar Chart based on report calculations...

Asked By Ann
27-Jan-10 11:05 AM
I am using Access 2002.  I have a query with one field called
txtUsedKnowledge that has four possible responses.  They are Never, Small
Extent, Moderate Extent and Great Extent.

I did many calculations with these including counting them individually and
getting the percent for each one based on the over all count.  Now I would
like to create a bar chart with the four responses listed that will update
each time it is run.

I created the chart but have to type in the figures for each response
myself.  Since the calculations are done on the report and not in the query
is there a way to use the fields from the report.  Unfortunately, this is my
first time trying to use the Chart feature in Access.  If I cannot do this
with the Chart option is there another way to have a bar appear on a report?
Thank you in advance for any help that will be offered.
Never.Width
(1)
Report
(1)
TxtUsedKnowledge
(1)
Tremors
(1)
Textbox
(1)
Santus
(1)
  Steve replied to Ann
27-Jan-10 02:16 PM
Since there are only four elements, I would not create a bar chart. I would
use a textbox for each element and adjust the width of each textbox to
represent the percent of each. It would look like:
____________
Never                         [____________]    35%
______
Small Extent              [______]                  15%
__________
Moderate Extent       [__________]         30%
________
Greate Extent           [________]              20%

You can do all the calculations (count, percent, width) in a query. Note
that percent would be shown in a separate textbox and its Left property
would also need to be set by the calculated percent. Since all calculations
are done in a query, the display would aotomatically update as the data
changed.

Steve
santus@penn.com
  Ann replied to Steve
28-Jan-10 02:24 PM
I am really rather lost by what you are explaining.  I do not understand how to
get a textbox to adjust it is size based on a number.  Plus, my calculations
were not done in the query but on the report in unbound textboxes that are in
the report footer.  Can you give me more detail?
  Gina Whipp replied to Ann
28-Jan-10 02:38 PM
Ann,

What Steve is proposing is probably a little more coding.  Please post the
SQL of the query you are using to create your chart.  Seems to me you could
use the same unbound text boxes on the chart BUT it depends on the query
which might need a little modfication or not...

--
Gina Whipp
2010 Microsoft MVP (Access)

II

http://www.regina-whipp.com/index_files/TipList.htm

I am really rather lost by what you are explaining.  I do not understand how
to
get a textbox to adjust it is size based on a number.  Plus, my calculations
were not done in the query but on the report in unbound textboxes that are
in
the report footer.  Can you give me more detail?
  Steve replied to Ann
28-Jan-10 02:48 PM
You need to make the recordsource of your report a query. You then can do
your calculations in the query.

You need to determine what width you want for 100%. Say 4 inches. That's 4 x
1440 = 5760 twips. Then say in your query you calculate Never percent to be
35%. You set the width of the textbox with:
Me!Never.Width = .35 * 5760

Put that code in the Open event of your report.

Steve
santus@penn.com
Create New Account
help
Discussions Access 2010 (1) Error (1) Excel (1) INNER JOIN (1) Relative (1) Boolean (1) TextBox (1) Routine (1) I do not know about A2010, but is this something you can Simply, there are 2 controls which can be repeated numerous timed. There is a small TextBox (Place01) about ?? square with the control source = 1 marking the corner of a larger TextBox (Space01) which will hold the boat name and owner. This can be repeated ad nauseam As Long Set CtlSpace = ActiveCtl CtlSpace.Escapement = CInt(Angle) SaveCtlPosition (CLng(Right(CtlSpace.Name, 2))) CtlSpace.Width idth = fTextWidth(CtlSpace, Nz(CtlSpace.Caption, CtlHeight = CtlSpace.Height If Cos(Angle * Pi / 180) < 0 Then CtlSpace.Width ce.Width = CtlSpace.Height - CtlSpace.Width * Cos(Angle * Pi / 180) Else CtlSpace.Width ce.Width = CtlSpace
ColNameHeader = 3D False CharacterSet = 3D ANSI Format = 3D delimited(;) textDelimiter = 3D"none" Col1 = 3D"F1" char width 50 Col2 = 3D"F2" char width 50 Col3 = 3D"F3" char width 50 Col4 = 3D"F4" char width 50 Col5 = 3D"F5" char width 50 Col6 = 3D"F6" char width 50 Col7 = 3D
16px"> < / span> ) http: / / informix-myview.<WBR> blogspot.com / < / a> <span style = 3D"padding-right:1 = 6px;width:16px;min-height:16px"> < / span> and do not reflect on my employer, Advanced DataTools, the www.iiug.org / mailman / <WBR> listinfo / informix-list< / a> <span st = yle = 3D"padding-right:16px;width:16px;min-height:16px"> < / span> Art, If it were your database would you use just lse, 'ttl':7200, 'expireTime':'20120416131550'}, self = .className)}, 600);" class = 3D"wrc0" style = 3D"padding-right:16px;width:16px;h = eight:16px"> < / span> )<br> Blog: <a href = 3D"http: / / informix-myview.blogspot.com false, 'ttl':7200, 'expireTime' ;:'20120416113746'}, self.className)}, 600);" class = 3D"wrc11" style = = 3D"padding-right:16px;width:16px;height:16px"> < / span> <br> s and do not reflect on my employer, Advanced DataTools
sql query needed urgent DataBase item len width height c / nc shoes 10 5 7 racket 4 23 12 rabit 5 12 14 i have a table with the fields item, length, width and height. i will have to add another field c / nc. This field is calculated Marshall Barton (1) Bob Barrows (1) Database (1) Len (1) [c / nc]: IIf(10*height / IIf(width> len, len, width) - IIf(width> len, width, len)) > 10, "nc", "c") - - Marsh MVP [MS Access] If only it
Can not get size of list width DataBase For a form I am using ControlBoxField.ListWidth = 7.5 (or any other value) but resizes the drop down list width to the width of the drop down box. The help states that the value can not be less than the width of the control box - being larger should be fine. Instead I have to use ControlBoxField