Manipulating a chart on a form based on combo boxes and date range (1 Viewer)

RussellDeano

Registered User.
Local time
Today, 07:02
Joined
Aug 19, 2017
Messages
22
Hello All,

I am trying to manipulate a chart based on a selection of combo boxes and a between dates picker but being new to access and not being competent with VBA and SQL i am struggling somewhat.

I have a table of information called "Events"
And from that information i would like to have the ability to display a chart on a form or subform that displays the incidents based on the user selecting criteria

Date from
Date to
Incident Type
Incident Location

For example if the end user select

01/01/2017
to
10/02/2017
Accidents
Northfields

I would like the chart to show all "Accidents" that happened at Northfields between 01/01/2017 and 10/02/2017.

I have searched online but cannot find a simple explanation or tutorial of how to do this. Unfortunately those i have found have been too advanced for me to follow.

Any help would be appreciated. I have attached an image of the rough final look i was thinking about for the form.
 

Attachments

  • Capture.JPG
    Capture.JPG
    30 KB · Views: 96

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 22:02
Joined
May 7, 2009
Messages
19,247
Use Query By Form. Use your forms control to filter the query.

Access is not very good when it comes ti chart appearance. Yiu might want to consider moving the result of the query to excel, di the chart there and export the chart as picture.
 

RussellDeano

Registered User.
Local time
Today, 07:02
Joined
Aug 19, 2017
Messages
22
Use Query By Form. Use your forms control to filter the query.

Access is not very good when it comes ti chart appearance. Yiu might want to consider moving the result of the query to excel, di the chart there and export the chart as picture.

Thank you very much for a speedy reply, could you possibly give me an example of what you mean when you say "Use your forms control to filter the query"

I have tried to create a query but it wants to base the query off of a table or another query..
 

RussellDeano

Registered User.
Local time
Today, 07:02
Joined
Aug 19, 2017
Messages
22
Apologies i have just realised how simple that is i am trying it now thank you!
 

RussellDeano

Registered User.
Local time
Today, 07:02
Joined
Aug 19, 2017
Messages
22
Hello ArnelGP,

Now i have the below but am struggling to get the command button to work to update my form. If i open the subform seperately the query runs and chart displays the data i input.
 

Attachments

  • Capture.JPG
    Capture.JPG
    30.1 KB · Views: 83

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 22:02
Joined
May 7, 2009
Messages
19,247
You can do it on each Control's AfterUpdate Event. Just issue Me.ChartName.Requery

Same as on your button Click Event issue the command.
 

Users who are viewing this thread

Top Bottom