Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 25th, 2010, 11:29 AM
Authorized User
 
Join Date: Mar 2010
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
Default Slick graph needs refresh

I have a form that contains some controls that allows the user to basically build a query (pick dates/attributes from a schedule) to update a subform and also build a table.
Also on the form is a MS Graph Chart (MSGraph.Chart.8) OLE object

1. i create a SQL statement that is used as the RecordSource for my subform. this updates my subform ok.

2. using similar data for 1., i create a table called tbl_tempSchedule.

3. my OLE graph chart object has as its Row Source = tbl_tempSchedule.

How can I get my graph to refresh and redraw itself as soon as tbl_tempSchedule has a new set of data?

Please help,
Thank you very much.
 
Old March 25th, 2010, 01:18 PM
Authorized User
 
Join Date: Mar 2010
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
Default solution

I believe i got it to work!

Code:
    'build table for graph
    strSQL_table = strSQL_table & strSQL2
    
    'build record source for subform
    strSQL_subform = strSQL1 & strSQL2

    'update the subform
    Me.sub_TempSched.Form.RecordSource = strSQL_subform

    DoCmd.RunSQL strSQL_table

    'requering the graph so it's redrawn with current data
    Me.OLEUnbound_DayGraph.Requery
Now the only problem i have to correct is that my first row of data is missing in my graph (header line assumed???)

just an FYI
(not so)Disgruntled





Similar Threads
Thread Thread Starter Forum Replies Last Post
asp and graph mateenmohd Classic ASP Basics 0 June 28th, 2007 07:38 AM
Refresh GridView Using Refresh Button msbsam ASP.NET 2.0 Professional 0 December 6th, 2006 05:57 AM
graph pab006 Classic ASP Basics 5 July 26th, 2004 10:06 AM
graph pab006 Classic ASP Basics 1 April 30th, 2004 10:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.