Solved

Chart Object

Posted on 2011-02-13
4
574 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 20

Expert Comment

by:darbid73
ID: 34885835
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
ID: 34886771
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 20

Accepted Solution

by:
darbid73 earned 250 total points
ID: 34886884
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
ID: 34886926
Thank you for the asistance!
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

636 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