Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2010

    Passing a Picture frame as a parameter

    Private Sub getImage(ByVal lookup As String, activity As Image)
        lookup = Replace(item, " ", "")
        activity .Picture = CurrentProject.Path & "\images\activities\" & lookup & ".bmp"
        activity .ControlTipText = "Wewt"
    End Sub
    I can't get this to work and I'm beyond fuming right now. I've tried ObjectFrame, Object, TextBox, etc and it doesn't work.

    I'm passing a string from a Lookup column and the picture box to place the picture in.

    Lookup Column = "Eat Food"
    Picture Box = activity
    getImage (column), (activity)
    WTH is going on?!

  2. #2
    Join Date
    Sep 2010
    I figured it out. Turns out, my code was working perfectly, just my call was wrong. I thought you had to enclose params with Paren's

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 10
    Last Post: 09-27-2010, 08:06 PM
  2. Macro passing a parameter
    By SlowPoke in forum Access
    Replies: 1
    Last Post: 09-26-2010, 09:57 PM
  3. Replies: 1
    Last Post: 08-05-2010, 12:11 PM
  4. Replies: 0
    Last Post: 05-02-2010, 10:21 PM
  5. bypassing passing parameter when null
    By cowboy in forum Queries
    Replies: 11
    Last Post: 04-14-2010, 09:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Other Forums: Microsoft Office Forums