Solved

Chart Object

Posted on 2011-02-13
4
565 Views
Last Modified: 2013-11-05
Hello experts ,

i use chart object in access .I have succesfully integrated it into my form but i have the following issue: The object is set to "locked" but it is still clicable and when i click on it a new window opens and i can edit there the options (legend graph etc).I want my form only to show this control and noone to edit it( either if the graph is clicked) .i want in simple words something like an "image" that wont be able to be edited in the form but will be updated after the data changes.Is that possible ?

Thank you!
0
Comment
Question by:stathisx
  • 2
  • 2
4 Comments
 
LVL 19

Expert Comment

by:darbid73
Comment Utility
I see that you have tagged this for Access 2010.  I do not have that.  

If I have a chart on a form I put in the "Click" event and the "doubleclick" event of the chart control a "setfocus" to another control such as a button.

Me.MyButtonName.Setfocus

This stops it for me in for example access 2003.
0
 
LVL 1

Author Comment

by:stathisx
Comment Utility
first of all thank you for the assistance.the solution you provided partially solves my problem but when i right click on the chart object i have a menu which allows me to edit the chart.i want it to be disabled too.how this can be done ?

thank you!
0
 
LVL 19

Accepted Solution

by:
darbid73 earned 250 total points
Comment Utility
Assuming you do not have a special event for right clicks, this would be a hack solution.

You can trap the mouse event


Private Sub chart_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)

   Select Case Button
           
      Case 2 ' right click
              
       'setfocus elsewhere
       
    End Select

End Sub


End Sub

Open in new window

0
 
LVL 1

Author Closing Comment

by:stathisx
Comment Utility
Thank you for the asistance!
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now