Chart & Visualization Issues

Include or Exclude Microsoft Access Modern Chart Columns with VBA

Tauseeq MagsiTauseeq Magsi Nov 14, 2026 868 views

Question details

The user wants to control which data columns appear in a Microsoft Access modern chart using VBA.

Include or Exclude Microsoft Access Modern Chart Columns with VBA
Product
Microsoft Access modern charts
Device & OS
not provided
Scenario
A modern chart needs to show or omit columns as its data source changes.
Observed behavior
The chart should use the selected source fields, while retaining appropriate series formatting where possible.
Before you start

Open the form or report containing the modern chart in Design View and identify the chart control name and the fields in its source query. Decide which fields the chart needs for its category and values before changing the source.

Solution 1Recommended

Update the chart's RowSource and ChartValues with VBA

Use this approach to change the fields available to a modern chart and specify which field supplies its values.

Update the underlying query or the chart's RowSource rather than trying to edit TransformedRowSource, which is read-only. Keep the category field and any other fields needed by the chart in the source.

Changing the source can affect series formatting, so review the chart after each source change.

1
Inspect the chart source

In Access, open the form or report in Design View, select the chart, and use its Property Sheet to identify the control name and current Row Source.

2
Prepare the source query

Open the source query in Query Design or SQL View and choose the fields to include. Remove unwanted fields from the SELECT statement, while retaining the fields needed for the chart's category and values.

3
Set the properties in VBA

Open the form or report's VBA module and, in the appropriate event procedure, set the chart control's RowSource to the updated query or SQL statement. Set its ChartValues property to the field or fields that should supply the chart values.

4
Refresh and verify

Run the event procedure, refresh or requery the chart control, and inspect the displayed series. If colors, labels, or other series formatting have changed, adjust them in the chart settings.

Update the chart's RowSource and ChartValues with VBA
Check field names: The fields specified in ChartValues must be available in the updated RowSource. Test each source configuration to confirm the intended columns and formatting appear.
Free Microsoft Office alternative

Create spreadsheet charts with WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for working with spreadsheet data and charts. Its Microsoft Excel format compatibility helps you move spreadsheet work easily, though it does not fix Access chart VBA or replace an Access database.

Create charts from selected spreadsheet data.Open and edit Microsoft Excel XLS and XLSX files.Work in a familiar, easy-to-use spreadsheet interface.Use a free, lightweight office suite.
microsoft office alternative - wps office

Frequently Asked Questions

Can I edit TransformedRowSource to change a modern chart?

No. TransformedRowSource is read-only. Update the underlying query or set the chart's RowSource in VBA instead.

How do I choose which field provides chart values?

Set the chart control's ChartValues property in VBA to the desired field or fields, and make sure they are included in the chart's RowSource.

Why did my chart colors or series formatting change?

Changing the source can alter how Access identifies chart series. Refresh the chart after the change and review its series formatting in the chart settings.

Can WPS Office run the Access chart VBA?

No. WPS Office can create spreadsheet charts, but it does not fix or run Microsoft Access modern chart VBA. Use Access to update the database chart.