Here’s the given an article will guide you to know that “How to change the Graph type at run time” using VBA code in MS Access. This article explains through an example here:-
Firstly create a Table in the Database which contain 2 fields show below in fig :- 1.1.
Create a form with Graph and Radio Group. When the user click on the radio button then change the type of Graph. Eg:- If you click on column radio button then show the Graph in column. Show in fig:- 1.2.
If you click on the “line” radio button then Graph change in line format. Like this you change the Graph type like Column , Line , Pie , Area , Doughnut , Bar , Radar , Scatter. As shown in Fig:- 1.3.
Set the option value of radio button
Steps for set the option value of radio button
‘------------------- Code for On After Update event of the "optionGroupChart" -------------------
Option Compare Database
Private Sub optionGroupChart_AfterUpdate()
[Graph0].Object.Application.Chart.ChartType = optionGroupChart
It is advised that the information provided in the article should not be used for any kind formal or production programming purposes as content of the article may not be complete or well tested. Access Guru will not be responsible for any kind of damage (monetary, time, personal or any other type) which may take place because of the usage of the content in the article.