Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Annoying popup when closing a form with embedded chart

Status
Not open for further replies.

aliendan

Programmer
Jun 28, 2000
79
0
0
US
When closing forms that I made with embedded charts on them I always get an annoying popup that says, "The object is locked, so any changes you make will be discarded when the form is closed. Click Save As/Export on the File menu and save the object under a different name." Is there anyway at all to get this popup to stop showing up?!!
Dan Rogotzke
Dan_Rogotzke@oxy.com
 
I am having the same problem as above. Any possible solutions are appreciated. Thanks.

Marrow
 
try using this line of code in the form unload event

docmd.setwarnings false

be sure to reverse this with

docmd.setwarnings true

or you will not get any of the prompts that are useful

hope this is helpful

[bigears]
 
EarS,

I tried the setwarnings technique, but it still showed the messages. I found that if instead of locking the chart/graph, I set enabled = false, the error did not appear anymore. I appreciate your time and help. Thanks.

Marrow

 
MarrowGenx, you said you set the 'Enabled' property of the chart/graph to = false.. do you do that right before you exit the form or when? Thanks
 
andy,

I set the graph object's enabled property = to false in the form open (the last line of code in that sub). When I close the form, i set the enabled = true (the last line of code in that sub). I dont know why I reenable it, but it just makes sense to put it back the way it was. Hope this helps.

Marrow
 
Marrow,
Thank you. Yes that does help. The problem I'm having with it is that the graph turns grey when I disable it. Is there any way around that? Thanks

Andrew
 
Andrew,

This is the way my graph currently works:

1. The chart object is always locked
2. I set enabled = false in the form load
3. I set SetWarnings = false in the form load

It seems as though I never enable, unlock, or setwarnings = true throughout the rest of the code for this form. I hope using these three will help you get the desired result.

Nathan
 
I was trying to remember what I did to fix my problem so I went back to investigate. All I did was click on the chart in form design view and set the chart "Enabled" property to "No" and this fixed the problem for me.
Dan Rogotzke
Dan_Rogotzke@oxy.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top