By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,488 Members | 2,552 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,488 IT Pros & Developers. It's quick & easy.

Autogenerating chart

P: n/a
Hello!

How to prevent from autogenerating chart after opening a form with a
chart?

I would like to set chart parameters which are located in a form, and
then click on a button which let me create a chart. Now while opening a
form, this chart is generating without no parameters. I don`t want to
set default values of these parameters.

Could you help me?

I would be very grateful for help
I couldn`t find any solution in group archives...
Thank you
Marcin from Poland

*** Sent via Developersdex http://www.developersdex.com ***
Jan 5 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Red
well, it sounds like you could just use a chart.requery to refresh the
chart...

I would do this:
private sub Form_open()
chart.visible = false
end sub

private sub cmdButton_click()
chart.requery
chart.visible = true
end sub

Jan 5 '06 #2

P: n/a


No I don`t use chart.requery while opening a form. I use it only after
selecting chart parameters and then I click on a button which include
chart.requery.

I am not at work now so I cannot check if chart.visible=false will help
but I think that the chart will be requering data from a query even if
chart is invisible. Am I right?

Do anybody have any idea how to fix my problem?

Thank you for all posts.
Kind regards
Marcin from Poland

*** Sent via Developersdex http://www.developersdex.com ***
Jan 5 '06 #3

P: n/a
Red
Well, yes, it will query upon form loading/opening..

Is the reason you dont' want it to query because the query takes
forever?

If so, you can set the recordsource of the chart to nothing, then add
the recordsource to the button, then requery...

i.e.

private sub cmbButton_click()
chart.visible = true
chart.recordsource = Your SQL string here
chart.requery
end sub

Jan 5 '06 #4

P: n/a
Red
Also,

I have a form that my client uses to make a dynamic chart based up
multiple factors...

When the form opens, the records source for the chart is nothing, and
the chart is set to invisible. After the user selects the options,
he/she clicks a button, the chart's recordsource is made, it's
requeried, then set to visible. Then I have all sorts of ncei options
after that, including printing it, exporting it excel, etc etc...
~Red

Jan 5 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.