BookmarkSubscribeRSS Feed
marinko
Calcite | Level 5

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!

7 REPLIES 7
AlanC
Barite | Level 11

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.

https://github.com/savian-net
marinko
Calcite | Level 5

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?

 

Capture.PNG

AlanC
Barite | Level 11

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.

https://github.com/savian-net
marinko
Calcite | Level 5

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:

Capture.PNG

AlanC
Barite | Level 11

Are you sharing this out to other people or just for your own use?

https://github.com/savian-net
AlanC
Barite | Level 11

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. 

https://github.com/savian-net

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 1468 views
  • 0 likes
  • 2 in conversation