Create an unbound form, and add the textboxes you need to collect the criteria. Save the form, call it frmCriteria.
Create a query that contains the fields you want in your chart. In the criteria line of the query, enter [Forms]![frmCriteria]![YourTextBoxName] for each of the fields.
Now create a New Report. Choose Chart Wizard and the query you just created above. The Chart Wizard will walk you through building the chart.
This should get you started. Let us know if you need more.
That would've be way to easy! I don't have the wizard installed, so I would need to know how to create it in code, without using any wizards. Did anybody ever created charts without a wizard?
Vika, I'm not sure what you mean by not having the chart wizard installed; I thought it was part of a standard Access install.
Anyway, if you have gotten your query defined; Create a new Report in Design View. From the menu choose Insert-> Chart. Click and drag a rectangular chart on your report.
If you don't have the Wizard, you should just see a generic report. Right click on the report. You should see Chart Object-> Edit. This will kick you into Microsoft Graph. If you right click there, you should see options to help you to set up your graph.
I'm building reports using the chart wizard within MS Access 97.
The report is based on two date fields and returns the information that falls between the 2 dates.
The criteria in my qry is as follows:
Between [Forms]![frmNCRReports]![begindate] And [Forms]![frmNCRReports]![enddate]
Now the qry runs just fine, so i know it's not a syntax problem, but when i run the report i get the following errormsg and the report opens up blank.:
The Microsoft Database engine does not recognize 'Between [Forms]![frmNCRReports]![begindate]' as a valid field name or expression.
I'm not sure, but you may want to define your criteria explicitly in the query.
In the query design view, choose Querye->Parameters from the menu.
then put
[Forms]![frmNCRReports]![begindate]
[Forms]![frmNCRReports]![enddate]
in the first 2 rows and change the Datatype to Date/Time.
This may help, though I'm not really sure. If it doesn't, you may need to build the query in code. Ask if you need help with that.
B
----------------------------------
Ben O'Hara
bo104@westyorkshire.pnn.police.uk
----------------------------------
You may wish to look at this sample database application provided by microsoft. There is not much help around concerning Microsoft Graph, but I've found this code example to be most helpful.
Here is a sample database from Dev Ashish that will give you timelines without graphs its pretty neat. Look at how he manipulates the rectange in a report to give timelines.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.