Access Barchart

 

Access Barchart Form Programming Example

Bar Graph and Barchart creation on an MS Access form is a pretty simple exercise -so  we thought.  All you need to do is create several colored .gif images and place them on the form.  The draw the axis lines and setup the axis labels.Next step is to do the calculations required to adjust the height of each colored image to match the relative values of the grouped data.  If you’ve tried this then you know is doesn’t work because Access will change the Top property setting for the colored bars too.  So you calculations must go one step further and not only adjust the height of the bars but also the starting location of each bar.

You can combine this basic bar chart example with our Access Histogram Query example to create even more useful form output.

The Access demo download creates a vertical barchart as shown below in the screen shot picture.  We haven’t tried the horizontal bar chart but we suspect it may be simpler (hopefully).

Try out our Access Bar Graph Example now!

 Bar Chart/Bar Graph

See our Active Server Page example for dynamic web-based bar charts and bar graphs.  These charts a based on an Access database that calculates axis data points and min/max values on the fly.

This dynamic Active Server Page output is shown below.  The source code for the ASP programming is also available on the link.

Visit our ASP Bar Chart example.

Note that we do not recommend this method for all cases of generating graphs in webpage there are times when you won’t want to rely on 3rd party software to make simple graphs and charts.  It is nice to know you can make you own using the fairly simple techniques show in this example.  Basically it is just a matter of scaling the data and setting the graphic image height based on the resulting scaled values.

 

Microsoft Office VBA, MS Access 2003, 2007, 2010, 2013, 2016