Hi,
is there a way to fill SAS Graph, let's say Pie, with Data in MS Access with VBA coding? Data should be retrieved from the linked SQL Database Table.
Thanks for any of your suggestions!
Can I ask for clarification? You have a few technologies mentioned here and i am not sure the validity of each part. What are you trying to do?
VBA is the wrong tech and, perhaps, MS Access is as well. SAS/Graph may be as well but that is not as important. Describe what you are trying to do. You can always generate SAS/Graph code using text and then %include it into the solution. I would use C#, read the access db and then generate a png using one of the nuget packages. However, if you have this as part of the processing chain it may be different.
What version of Access would help as well.
I have included SAS Graph Activex onto the form and want to load Data from the Table in MS Acess 2019 and display it in the Graph. I want to do it in the background with VBA coding... Is this possible? Maybe there are some working examples?
First of all, do not use ActiveX. It is very old technology not supported anywhere except IE (pretty sure) so bad choice. IE, I think, is on the chopping block soon so it is dead as a browser.
3D pie chart is bad: 2 things (3d and pie) combined so poor choice of communicating percentages: See here: https://depictdatastudio.com/when-pie-charts-are-okay-seriously-guidelines-for-using-pie-and-donut-c...
The question then becomes what to use in your Access form. I suggest using a png and just embed the image, if that is the question.
However, I think you asking how to solve an issue that should not exist. Ultimately, what are you trying to do? Provide some data dropdowns. let a user choose, then return a graph? If so, ActiveX is the wrong tech.
Sorry to be a downer but do not use ActiveX, 3D graphs, VBA. That puts you back to what and how. Give us more details and we help craft a directional solution.
When I am using MS Charting solution usually I just have to input the SELECT statement as a RecordSource and the Chart retrieves the Data. I am sure there is some kind of solution here also but I am clueless...The only real given solution here is a manual Data input which is not a good option:
Are you sharing this out to other people or just for your own use?
Sharing with others...
Well, that puts you in a challenging place. ActiveX is dead so no need to pursue that path. MS Access and VBA are close to dead. I am not familiar enough with your needs to recommend an overall architecture. However...
Look at Microsoft PowerApps. That would probably be the best tech I can think of for what you are facing. Connect the data to a SAS dataset using the SAS OleDb/ODBC driver. Barring that, use something like Sqlite to house the data so it is standalone.
FYI, I am writing a SAS dataset to Sqlite converter right now but it won't be ready for primetime for a week or so. Once it looks good, I will put in on github.
You are welcome to reach out and ask questions. Unfortunately, you have an XY Problem that is hard to answer remotely.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: