Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2004
    Location
    Orange County, California
    Posts
    3

    Talking Unanswered: Image with Index property in VBA.

    Hello to the Forum! I just signed up today.

    My question is for the ACCESS 2002. I have started ACCESS and VBA for about 2 months. My approach to the ACCESS is through the VBA route.

    Application Background: I have a table (created dynamically through the SQL in my Code) that have X and Y coordinate values. I want to create "Image" object in Run-time and "Move" to the location according to the X and Y value.

    So Far: I can move 1 Image object using the values. But I want to create "multiple" objects in Run-time. In VB 6, the "Image" object allows Indexing, but the VBA doesn't.

    Question: How can I create Index property for the Image object in ACCESS?

    What I "think" are my options: Create my own Class? Automation? Buy a commercially available Modules? Learn VB and create everything from it rather than using VBA.

    I do appreciate for your time.

    Best regards,

  2. #2
    Join Date
    Oct 2003
    Location
    Canada
    Posts
    574
    Why do you need an index property?

  3. #3
    Join Date
    Mar 2004
    Location
    Orange County, California
    Posts
    3

    Post

    The form I have crated, gathers two variables (x) and (y). I would like to create many Image objects (small dots in JPEG) over the form and use .Move method to move them into their X and Y location. Since it is a dynamic SQL in gathering X,Y pairs, I assign those values using array.

    Perhaps, you suggest another option?

    Originally posted by jmrSudbury
    Why do you need an index property?

  4. #4
    Join Date
    Oct 2003
    Location
    Canada
    Posts
    574
    You could name the image objects p01, p02, p03, ...
    to access them without an index, use:

    Me("p" & Right("00" & lngPointNumber))

    Where lngPointNumber is a long integer that would be your index

  5. #5
    Join Date
    Mar 2004
    Location
    Orange County, California
    Posts
    3
    Originally posted by jmrSudbury
    You could name the image objects p01, p02, p03, ...
    to access them without an index, use:

    Me("p" & Right("00" & lngPointNumber))

    Where lngPointNumber is a long integer that would be your index
    Do I need to creat those Image objects manually? In other words, do I need to create them in Design-Time?

  6. #6
    Join Date
    Oct 2003
    Location
    Canada
    Posts
    574
    You can try the create object commands, but that may not work if your users are using an mde

Posting Permissions

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