Dynamic creation of rectangles as chart bars
Your problem is that you need to dynamically create the bar objects individually. Ugly but not impossible. However, dynamic control creation means that the sizing on your form ALSO needs to change. And you need to decide about labeling, which will also be dynamic.
Now, as to how to do it, there is such a thing as opening the "controls" collection of a form section and doing an .AddNew. When you define the control, you can make it a RECTANGLE. (Trust me...). Issues YOU must decide include scaling, labeling, color schemes, and other factors of visual presentation and aesthetics.
For each rectangle you create, you need to resize it according to your scaling data. So here is what you need to know.
Any rectangular object in Access has four critical properties that determine its size and location. These are .TOP and .LEFT (position of the top-left corner) and .HEIGHT and .WIDTH (should be obvious in meaning.) What is NOT so obvious is that the report section, being rectangular, ALSO has these properties. So you can determine the size of the section and then scale the rectangles accordingly. The way this works is a little kinky, though.
The .TOP and .LEFT are relative to the top, left corner of the section. So a rectangle that occupies the top, left corner has 0,0 for its ( .TOP, .LEFT ) properties. The sum of .TOP and .HEIGHT for any control cannot exceed the .HEIGHT of the section. Ditto, the sum of .LEFT and .WIDTH vs. section width.
If you do all of this in relative terms via simple ratio formulas, it hardly matters, but you should know that the size units are called TWIPS and that they are LONG integers. So to scale them involves finding the scaling ratio, converting that to TWIPS, and loading the result to the correct properties.
For instance, if you have a maximum of 10,000 in the thing you want to graph and it is currently at 8,700, you would perhaps compute the correct width as
rect.WIDTH = INT( maxTWIPS * 8700 / 10000 )
Or something close to that. Remember that the control is a LONG integer so you must end up with that data format. Further, negative width would not be good and if you were going to show 0 width, you would do better to not create the rectangle in the first place.
OK, next question: WHEN to do this? On a report, you have an OnFormat event that applies to a section. My best guess is that if you are going to do this on-the-fly, it would have to go into the section's OnFormat event routine.
Which means you need to read up on the following Access elements, all of which can be found in the help files:
Collections (in general) including examples of manipulating same
Report Sections and their properties
Controls (as a collection in a report or form section) and their properties
Rectangles and their properties
Label boxes (which might be how you would tag your bars) and their properties
OnFormat event in reports
Adding a Control