Hello everyone,
I want to display the values in a graph for the categorie "Histogramme 1" for example by choosing the categorie in the scroll-down list.
How can I do that ?
I will put the image in the comments
Thank you very much.
Hello everyone,
I want to display the values in a graph for the categorie "Histogramme 1" for example by choosing the categorie in the scroll-down list.
How can I do that ?
I will put the image in the comments
Thank you very much.
I cant put an image.
I want to display the amount of sales by year for example but choosing for which product by choosing the product in a list
A graph RowSource can reference a control in WHERE clause, example:
SELECT M, D, FD, ZD, ZDM FROM GraphProctor WHERE LabNum=[tbxLabNum];
Post your graph RowSource if you need more help.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
I tried to put a where condition in the source query of the graph but I add an error
"the database engine does not recognize the list name as a correct name or expression"
As I said, provide RowSource if you need more help.
If you want to provide db, follow instructions at bottom of my post.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
I'm sorry i cant provide my original db so i tried with a test one. I just found out how to upload it it's bellow in my last post. But I only want to know if there is a solution for my problem. I want to know what vba code should I put when the event change the selection on the list happend. Sorry I'm french I don't understand everything in english. Thank you in advance.
db.zip
my test database
In the attachment you can see an example to get what you want.
DB.zip
Use this SQL as graph RowSource:
PARAMETERS [Modifiable0] Text ( 255 );
TRANSFORM Sum(Requête1.sales) AS SommeDesales
SELECT Requête1.year_sale FROM Requête1
WHERE (((Requête1.product)=[Modifiable0]))
GROUP BY Requête1.year_sale
PIVOT Requête1.product;
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Thank you very much. Unfortunatly I cant download this database frome work.
I tried the sql query you wrote and to put it as the source of my graph and I have the following error message :
the selected query does not contain enough data to create a chart or the fields cannot be extracted. select a table or query containing at least one numeric date or text field
Here is the SQL from CarlettoFred's DB
Rowsource for graph isCode:SELECT tblSales.YearSale, tblProducts.IDProduct, tblProducts.Product, tblSales.Sales FROM tblProducts INNER JOIN tblSales ON tblProducts.IDProduct = tblSales.IDProduct ORDER BY tblSales.YearSale, tblProducts.Product;
HTHCode:TRANSFORM Sum(qrySaleProducts.Sales) AS SommeDesales SELECT qrySaleProducts.YearSale FROM qrySaleProducts GROUP BY qrySaleProducts.YearSale PIVOT qrySaleProducts.Product;
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba
Just to be sure the rowsource is a query you select when you make the graph ?
Thank you very much.
And in the code you wrote I don't see the where condition to select the value from the list is that normal ?