Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Mar 2001
    Location
    San Clemente, California, USA
    Posts
    130
    Thanks
    2
    Thanked 0 Times in 0 Posts

    A97: On Format Help

    Hi everyone.. I have a problem I'm hoping to get some help on...

    In On Format under the Detail Section of my report I have the following:

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    If Not IsNull(Me!Pict1Path) Then
    Me!Pict1.Visible = True
    Me!Pict1.Picture = Me!Pict1Path
    Else: Me!Pict1.Visible = False
    End If
    If Not IsNull(Me!Pict2Path) Then
    Me!Pict2.Visible = True
    Me!Pict2.Picture = Me!Pict2Path
    Else: Me!Pict2.Visible = False
    End If

    End Sub

    Pict1Path is the name of the field in my DB that contains the path to my pictures
    Pict1 is what I've named the image control on my report..

    When I open the report I get the following error:

    <<Successor Pictures can't find the field 'Pict1Path' referred to in your expression>>

    But I have the same thing in a form:

    Private Sub Form_Current()
    If Not IsNull(Me!Pict1Path) Then
    Me!Pict1.Visible = True
    Me!Pict1.Picture = Me!Pict1Path
    Else: Me!Pict1.Visible = False
    End If
    If Not IsNull(Me!Pict2Path) Then
    Me!Pict2.Visible = True
    Me!Pict2.Picture = Me!Pict2Path
    Else: Me!Pict2.Visible = False

    End If

    End Sub

    & it works just dandy...

    Can anyone let me know why it doesn't work in the report..

    -Leslie

  2. #2
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    352
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: A97: On Format Help

    Without worrying too much why it does not work, if you drag the pict1path and pict2path fields from the field list onto your form, and then make them invisible it will work.
    David Grugeon
    Brisbane Australia

  3. #3
    2 Star Lounger
    Join Date
    Mar 2001
    Location
    San Clemente, California, USA
    Posts
    130
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: A97: On Format Help

    It Worked!

    Thank you so very much David!

    -Leslie

Posting Permissions

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