Should click the image frame then the picture show up

Discussion in 'Microsoft Access Forms' started by Frank Situmorang, Jul 15, 2008.

  1. Hello,

    I have the field named: image path on my member table and then I have the
    image frame on the page tab.

    Here is the VBA on the image path control:
    Private Sub ImagePath_AfterUpdate()
    On Error Resume Next
    Me!ImagePath = "C:\churchdata\" & Me![ImagePath]
    If Not (IsNull(Me.ImagePath)) Then
    Me.ImageFrame.Picture = Me.ImagePath
    End If
    End Sub

    And here is the VBA on the pagetab:
    Private Sub Household_Members_Click()
    On Error Resume Next
    If Not (IsNull(Me.ImagePath)) Then
    Me.ImageFrame.Picture = Me.ImagePath
    Else
    Me.ImageFrame.Picture = "C:\churchdata\Nopicture.jpg"
    End If
    End Sub

    Now the problem is ONLY when I click on image frame, then the photo shows up.

    Anyone can help me please how can I make it when click the tab of the page,
    the photo will show up?

    Thanks very much for your help.
    --
    H. Frank Situmorang
     
    Frank Situmorang, Jul 15, 2008
    #1
    1. Advertisements

  2. The Change event of the Tab control is the event to use instead of the Click
    event, which fires for any page on the Tab control.
    --
    Arvin Meyer, MCP, MVP
    http://www.datastrat.com
    http://www.mvps.org/access
    http://www.accessmvp.com


    "Frank Situmorang" <> wrote in message
    news:...
    > Hello,
    >
    > I have the field named: image path on my member table and then I have the
    > image frame on the page tab.
    >
    > Here is the VBA on the image path control:
    > Private Sub ImagePath_AfterUpdate()
    > On Error Resume Next
    > Me!ImagePath = "C:\churchdata\" & Me![ImagePath]
    > If Not (IsNull(Me.ImagePath)) Then
    > Me.ImageFrame.Picture = Me.ImagePath
    > End If
    > End Sub
    >
    > And here is the VBA on the pagetab:
    > Private Sub Household_Members_Click()
    > On Error Resume Next
    > If Not (IsNull(Me.ImagePath)) Then
    > Me.ImageFrame.Picture = Me.ImagePath
    > Else
    > Me.ImageFrame.Picture = "C:\churchdata\Nopicture.jpg"
    > End If
    > End Sub
    >
    > Now the problem is ONLY when I click on image frame, then the photo shows
    > up.
    >
    > Anyone can help me please how can I make it when click the tab of the
    > page,
    > the photo will show up?
    >
    > Thanks very much for your help.
    > --
    > H. Frank Situmorang
     
    Arvin Meyer [MVP], Jul 15, 2008
    #2
    1. Advertisements

  3. Thanks very much Arvin, it works now perfectly.

    Warmed Regards
    --
    H. Frank Situmorang


    "Arvin Meyer [MVP]" wrote:

    > The Change event of the Tab control is the event to use instead of the Click
    > event, which fires for any page on the Tab control.
    > --
    > Arvin Meyer, MCP, MVP
    > http://www.datastrat.com
    > http://www.mvps.org/access
    > http://www.accessmvp.com
    >
    >
    > "Frank Situmorang" <> wrote in message
    > news:...
    > > Hello,
    > >
    > > I have the field named: image path on my member table and then I have the
    > > image frame on the page tab.
    > >
    > > Here is the VBA on the image path control:
    > > Private Sub ImagePath_AfterUpdate()
    > > On Error Resume Next
    > > Me!ImagePath = "C:\churchdata\" & Me![ImagePath]
    > > If Not (IsNull(Me.ImagePath)) Then
    > > Me.ImageFrame.Picture = Me.ImagePath
    > > End If
    > > End Sub
    > >
    > > And here is the VBA on the pagetab:
    > > Private Sub Household_Members_Click()
    > > On Error Resume Next
    > > If Not (IsNull(Me.ImagePath)) Then
    > > Me.ImageFrame.Picture = Me.ImagePath
    > > Else
    > > Me.ImageFrame.Picture = "C:\churchdata\Nopicture.jpg"
    > > End If
    > > End Sub
    > >
    > > Now the problem is ONLY when I click on image frame, then the photo shows
    > > up.
    > >
    > > Anyone can help me please how can I make it when click the tab of the
    > > page,
    > > the photo will show up?
    > >
    > > Thanks very much for your help.
    > > --
    > > H. Frank Situmorang

    >
    >
    >
     
    Frank Situmorang, Jul 16, 2008
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest

    Inserting a picture into a Bound Object Frame

    Guest, Nov 2, 2003, in forum: Microsoft Access Forms
    Replies:
    0
    Views:
    280
    Guest
    Nov 2, 2003
  2. John Baker

    Insert picture into bound OLE frame

    John Baker, Jan 31, 2004, in forum: Microsoft Access Forms
    Replies:
    1
    Views:
    343
    Arvin Meyer
    Jan 31, 2004
  3. Connie

    Unbound Object Frame picture doesn't show

    Connie, Jul 21, 2004, in forum: Microsoft Access Forms
    Replies:
    1
    Views:
    666
    Guest
    Jul 22, 2004
  4. charlie via AccessMonster.com

    click row on subform, then click button to open form to rcd in subform

    charlie via AccessMonster.com, Aug 8, 2006, in forum: Microsoft Access Forms
    Replies:
    1
    Views:
    363
    Albert D. Kallal
    Aug 8, 2006
  5. charlie via AccessMonster.com

    click row on subform, then click button to open form to rcd in subform

    charlie via AccessMonster.com, Aug 8, 2006, in forum: Microsoft Access Forms
    Replies:
    0
    Views:
    379
    charlie via AccessMonster.com
    Aug 8, 2006
Loading...

Share This Page