Ok so in my opinion the best would be to create your graph in Excel then make a pdf of it. This would be looped for each ID.
I am not going to give you the code to do it as it would take me a while to get it but I will give you the structure of how I would do it. You are welcome then to use this thread to ask specific questions on a specific piece of code you cannot get right. That way I also feel that you will learn as well.
Your friend and mine is the macro recorder in excel. If you want to see how to do something then start a recorded macro and do it manually, then look at the code. This will give you an idea of how to do it.
I am assuming that you are working in Access and have a normal access table.
First you have to decide which records you want to graph. For example lets say you want to graph just one. The idea here is that myID could be a FOR loop or something else that feeds into your SQL every ID you want to graph.
Second now how are you going to get this to Excel. I would suggest you have a master excel file. On Sheet two set up a table like you want it. On Sheet one set up the graph like you want it based on the table.
Here is how you open your excel master
Then what you are going to do is with the above code for each ID add the date and data to the existing table in excel. Then update the graph on the first sheet and then you will have your first graph. PDF this sheet, then loop to the next ID.
This means it would be something like this.
- Open your excel document
- Open your database record set based on your first ID
- Move to the first record in the database
- Move all data for this record into your excel table
- Update your graph based on this new table
- pdf the table
- move to the next rID
Bookmarks