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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Object is locked" message when exiting a form

Status
Not open for further replies.
May 27, 1999
9
IE
Can anyone help me with a problem I have with displaying a chart on a form

I have a form that can display information on two subforms. The info is shown on a chart or a query datasheet depending on which comnmand button I press.

There is a list box on the form and the data changes as I scroll down the list of activities - the chart shows how much time per month spent on each activity

However when I exit this form I get the following message

"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"

I am not sure what it is all about but it does not appear if I click on the chart before I try to close it

Grateful for any advice

Martin



 
I found a simple way to get around this.

Form_load
me.ChARTNAME.Setfocus

Then it sets the focus upon loading on the chart, and now you can exit the main form or quit it without the error. However a black border forms around it when it has focus.. Haven't figured out how to get rid of that yet.

Hope this helps..
 
Try locking the chart (Enabled = No, Locked = Yes). This worked for me.

Cheers


[yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top