Change chart x-axis with VBA in Access

Linus_99

Board Regular
Joined
Aug 28, 2002
Messages
145
Hi,

I'm trying to put together a charting routine to chart some values over a range of times.

I would like to enter the start and end dates and then extract values from a table to chart just that date range. [This is not too difficult in Excel, but is obscure to me in Access].

FYI, there is a Microsoft Knowledge Base article (KB198468) on re-scaling the y-axis, but I need to re-scale the x-axis, i.e. the time data.

Because this has to be driven by a number of users, I would like to do it in VBA, with just some text boxes for the start and end date, and a button to make it go.

Any advice would be appreciated. Thanks.

Linus.
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Is the data that is being used for the excel chart being accessed from a query or report?

If its a query using the date field criteria type:
Between [Start] And [End]

This will prompt the user to enter a start and end date range. Then the query will only give you that range.
 
Upvote 0
Thanks Parra,

The chart has to be in Access, & I wanted it driven by text box input. In any case, after trying just about everything else, I've used a pivot chart, so the user can select the period when the chart is displayed.

Cheers,
Linus
 
Upvote 0

Forum statistics

Threads
1,221,532
Messages
6,160,381
Members
451,643
Latest member
nachohoyu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top