472,805 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,805 software developers and data experts.

Q: Chart in form on demand only

Jim
I have this chart on a form. I'm trying to get this chart to render only if
the user chooses to do so. This because of that the chart is quite complex
and takes some time to render.
I know that I probably should put it on a report and call that report from
the form but for various reasons I need the chart on this form.
In a table bound to this form I have a Yes/No field and then from a checkbox
the user should get to choose if the form is rendered or not, for example if
the user has an old computer then he/she would want to turn off the chart
thus getting the form to load faster.
How do I make this happen? If I only set the chart visible or not then it
gets rendered anyway not speeding up the form even if it's chosen not to
show. Is there a way preventing the chart from loading/rendering in some
way? I tried messing with the charts recordsource with IIf and more but
without getting anywhere.
Nov 12 '05 #1
1 2126
On Tue, 24 Feb 2004 20:44:53 +0200, "Jim" <ji***@levenrute.com> wrote:
I have this chart on a form. I'm trying to get this chart to render only if
the user chooses to do so. This because of that the chart is quite complex
and takes some time to render.
I know that I probably should put it on a report and call that report from
the form but for various reasons I need the chart on this form.
In a table bound to this form I have a Yes/No field and then from a checkbox
the user should get to choose if the form is rendered or not, for example if
the user has an old computer then he/she would want to turn off the chart
thus getting the form to load faster.
How do I make this happen? If I only set the chart visible or not then it
gets rendered anyway not speeding up the form even if it's chosen not to
show. Is there a way preventing the chart from loading/rendering in some
way? I tried messing with the charts recordsource with IIf and more but
without getting anywhere.


Create a form that has only the chart on it. Remove the chart from your current form and add a subform control in the size / position where you want
the chart displayed. Leave the SourceObject property of the subform control blank initially. When the form is opened the subform will be blank. Adjust
backcolors, borders etc to get the look you want.

When you want to display the chart set the SorceObject property of the subform control to the name of the form containing the chart -
Me.MySubform.SourceObject = "frmMyChartSubform"

This will load the subform with the chart form and you will get the performance hit here.
To clear the subform control use -
Me.MySubform.SourceObject = ""

You will need to use the LinkMaster and LinkChild properties of the subform control, or a criteria in the underlying query of the chart, to ensure
that when the chart is displayed it shows the correct data for the current record on the main form.
Wayne Gillespie
Gosford NSW Australia
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
by: PeteCresswell | last post by:
I've been to http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mschrt/html/vbobjtitleobject.asp, but still don't have a clue. For example, I've got a chart object namde...
3
by: StBond | last post by:
Hi everyone, I am new to Access and Visual Basic so things my be getting across a bit cloudy. I only started using VB for one week. I am having a little problem with the database that I am...
0
by: spm_no | last post by:
Hi, I am using Access 2002 and am creating a scatter-chart on a form in which the X-axis is a date. I can format and display the x-axis properly as a date. However, when I close and reopen...
9
by: Patrick.O.Ige | last post by:
I have a code below and its a PIE & BAR CHART. The values now are all static but I want to be able to pull the values from a database. Can you guys give me some ideas to do this? Thanks ...
3
by: GoalieGW | last post by:
Does anyone know how to create a Pivot Chart at run-time? I have a database of meter readings that currently requires me to have 200 forms created so the user can enter date criteria and have a...
1
by: Saintor | last post by:
This is for A97 in runtime or MDE mode. My intent was to define a temporary query using the recordsetclone property / filter / orderby. The controlsource of my chart would be based on a grouped...
1
by: devagupt | last post by:
i have a form called get downtime data. WHen information is entered into it and the button "get downtime data" pressed , it displays the results of a query. WHen i view the query in pivot chart view...
1
by: ppabs | last post by:
Hello all, Originally, my goal was only to select all records in the "forecast_info" table where the table field "f_model" was equal to the content of a form field "v_model". I was able to...
14
by: Wayne | last post by:
I posted about this problem over 12 months ago and even after Vista SP1 the problem still exists when running an Access database (A2003 and A2007 tested) under Vista. A workaround was suggested by...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
How does React native implement an English player?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.