Results 1 to 6 of 6
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Vancouver, Br. Columbia, Canada
    Posts
    632
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Mouse events on graph object? (Graph 97/ Access 97)

    I have a graph object in an Access 97 form, and would like to be able to obtain coordinates where the mouse is clicked on the graphic object. Is this possible? I've tried the MouseUp and MouseDown events of the detail section -- which returns XY positions in ??? coordinate system. Tried the same events on the graphic object itself -- no response. The graph is of XY type - my real goal is to get the mouse position in the coordinate system (scale) of the XY graph.

    Any ideas?
    --------------------------------------------------
    Jack MacDonald
    Vancouver, Canada

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Mouse events on graph object? (Graph 97/ Access 97)

    Reports are not interactive, even those with graphs on them. What are you trying to accomplish? Any mouse position you get is going to be relative to the upper left corner of the window it's in, not to anything on the graph.
    Charlotte

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Vancouver, Br. Columbia, Canada
    Posts
    632
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mouse events on graph object? (Graph 97/ Access 97)

    The graph is on a form -- not on a report.

    The graph displays XY coordinates that are latitude/longitude pairs of GPS data. I want to zoom into the graph by digitizing lower-left, upper-right coordinates using the mouse. I've been able to zoom in and out of the graph using command buttons that change the X and Y scales of the graph, but it's too cumbersome to be workable. I thought if I could capture user-defined XY coordinates that I could use those coordinates to reset the graph's scale.

    Sorry for the confusion about Access vs VBA board -- I thought the VBA board was more appropriate because the graph control is non-application specific.
    --------------------------------------------------
    Jack MacDonald
    Vancouver, Canada

  4. #4
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mouse events on graph object? (Graph 97/ Access 97)

    This 1996 article by Michael Kaplan may be of interest to you. A working DB is also available for down load. It works with a bitmap, I don

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Mouse events on graph object? (Graph 97/ Access 97)

    No need to apologize. The graph object is generic across applications, but Access forms and reports are not the same as objects in other Office applications and code to manipulate an Access form isn't the same as code to manipulate an MS form.

    What code are you using behind a command button to do this?
    Charlotte

  6. #6
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Vancouver, Br. Columbia, Canada
    Posts
    632
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mouse events on graph object? (Graph 97/ Access 97)

    I know the current center and range of the XY data (obtained from a query on the data itself). The command buttons change the minimum and maximum ScaleX and ScaleY of the XY graph by a factor of *2 or /2, depending on which button was pressed. Essentially, it zooms the centre of the graph, and it works kinda-sorta if the area of interest is centered in the graph. Problem arises when the user wants to zoom an arbitrary location.

    What I am trying to do is to display some rudimentary, geographic data using just standard controls -- enough to satisfy some simple user requirements. This whole thing is a proof-of-concept idea that I might just abandon. At this point, I've satisfied myself that I'm not overlooking something obvious in the graph control, and any "scaling" function will likely be a roll-your-own solution. I've downloaded the article that Rupert suggested -- it looks promising.
    --------------------------------------------------
    Jack MacDonald
    Vancouver, Canada

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •