[AccessD] FW: FW: Create a BarGram from data

max.wanadoo at gmail.com max.wanadoo at gmail.com
Fri Sep 28 13:11:04 CDT 2007


Thanks Don, that is Ace!
I will use that as it looks nice and simple.

Jim: Thanks for sending the Excel Code.  It is appreciated.

Regards
Max
 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of McGillivray, Don
[IT]
Sent: Friday, September 28, 2007 6:34 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] FW: FW: Create a BarGram from data

Max,

Or more simply:

MaxRectangleHeight = 4 * 1440
NewRectangleHeight = (Raised / Target) * MaxRectangleHeight
Me!rctRaised.Height = NewRectangleHeight

That's about the way I've done it.

Good luck!

Don  

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
max.wanadoo at gmail.com
Sent: Friday, September 28, 2007 10:02 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] FW: FW: Create a BarGram from data

It does Don,
Thanks very much.  You see, what I can do is use an Access report/form or
whatever, which is scaled correctley for the actual v target and the use the
PntScrn button on the keyboard, past it into Paint and save as a jpeg.  This
I can then drop onto the web page on, say, a weekly basis.

I just need the code to generate the correct "picture" in Access so that it
is accurate.

So if target = 100% and equals £100,000 and equals  4inches (4 x 1440 twips)

and 

we have raised £20,000 to date then the corresponding bar is:

Raised = ((20000/10000) * 100)=20% of 4inches (=5760 Twips)
5760*(20/100)=1152 Twips

Excel give me: =(4*1440)*((Raised/Target)*100)/100

Have I got this right or is there a better way of scaling it?


Ta very much

Max
 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of McGillivray, Don
[IT]
Sent: Friday, September 28, 2007 5:32 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] FW: FW: Create a BarGram from data

Max, 

The way I did it was to establish a position on the page, bar width, and a
maximum bar height for the rectangles.  If you have only two values to
compare (walked v target) just make the rectangle representing the target
the maximum size and whatever color you want it.  Then you can superimpose a
rectangle of a different color over the target, and set its height value
according to the ratio of walked to target.  Just apply the same ratio to
the max height, set that as the height value, and redraw.  Note that the
properties sheet expresses the rectangle's dimensions in inches, but your
code must use twips.  1 inch = 1440 twips, if my memory serves.  I've also
done this by positioning different sized rectangles next to each other when
I had more than two metrics to compare to the whole.

Hope this helps . . .

Don

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
max.wanadoo at gmail.com
Sent: Friday, September 28, 2007 9:00 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] FW: FW: Create a BarGram from data

I have never done this Don,
Can you Scale a range so that it, say, fits a given size and then, say,
colour the increasing element, say blue, and the bit still to go, say red?

It would be a start.
Thanks
Max
 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of McGillivray, Don
[IT]
Sent: Friday, September 28, 2007 4:51 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] FW: FW: Create a BarGram from data

Max,

Well, you probably already have this part figured out, but it's the only
part I have an idea about.  I've created "bar charts" on Access reports and
forms using retrieved values to describe the dimensions of rectangle
controls.  But I suspect that your question is aimed more at creating the
graphic externally using Access data and moving it into your website,
presumably in an automated way.  That's beyond my ken, for sure.  I've never
used Access pages, but maybe there's some potential there?

Good luck . . .

Don

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
max.wanadoo at gmail.com
Sent: Friday, September 28, 2007 8:33 AM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] FW: FW: Create a BarGram from data

 Sorry for the repeat posting, but I have to try one more time to see if
anybody can help me with this.
Thanks
Max


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
max.wanadoo at gmail.com
Sent: Friday, September 28, 2007 1:51 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] FW: Create a BarGram from data

 Hi folks, just re-posting this hoping that somebody will be able to help me
out here.
Ta
Max


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
max.wanadoo at gmail.com
Sent: Friday, September 28, 2007 6:38 AM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Create a BarGram from data

Hi Folks,
I have to do something which I have never done before and would really
appreciate your help and feedback.
The charity I support is doing a charity walk and we need to have a guage
generated showing progress (something like you see on the side of a church
to show how the restoration fund for the new church roof is progressing).

My Access tables will capture the MilesWalked v MilesTarget and FundsRaised
v FundsTarget.

Somehow I have to generate a "picture" of each from these values which I can
then drop onto the web site as two graphics.

I will need to "scale" the MilesWalked to the MilesTarget and create the
"picture" from that.

And then do the same with the funds.  A sort of Progress Bar thingie but for
the web site.

All input is captured into an MDB, but how on earth do I do the rest?

Any help would be most appreciated.  Evan a start point.

Thanks
Max

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





More information about the AccessD mailing list