subreport control reference problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Frank

    #1

    subreport control reference problem



    I am trying to manipulate a textbox display value of subreport from main
    report's detail print() event.
    The goal is this, if there is no record from database, replace the blank
    space from textbox with message " No record found ".

    I found the exact expression to reference my subreport textbox value
    from main report, but when I tried to use IsNull() and Nz() function to
    distinguish between blank and non-blank value, surprising it did not
    work.

    When there is no record in sub-report, the textbox's value is " /<you
    entered an expression that has no value/> " in the watch window in debug
    mode. I could not find a way around this.

    Any expert?

    Sincerely

    Feng

    *** Sent via Developersdex http://www.developersdex.com ***
  • MGFoster

    #2
    Re: subreport control reference problem

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    The value in the TextBox may really be an empty string. Try:

    If Len(Trim$(Me!su bReport!TextBox )) = 0 Then
    ... whatever you do
    End IF

    --
    MGFoster:::mgf0 0 <at> earthlink <decimal-point> net
    Oakland, CA (USA)

    -----BEGIN PGP SIGNATURE-----
    Version: PGP for Personal Privacy 5.0
    Charset: noconv

    iQA/AwUBQlw/rIechKqOuFEgEQI zjgCfcRHO+T37tb IWyPXSQ7rX8B8lu 3cAn1O8
    4uGugakZAw5kv5s ueL1XkmxR
    =lWmr
    -----END PGP SIGNATURE-----


    Frank wrote:[color=blue]
    >
    > I am trying to manipulate a textbox display value of subreport from main
    > report's detail print() event.
    > The goal is this, if there is no record from database, replace the blank
    > space from textbox with message " No record found ".
    >
    > I found the exact expression to reference my subreport textbox value
    > from main report, but when I tried to use IsNull() and Nz() function to
    > distinguish between blank and non-blank value, surprising it did not
    > work.
    >
    > When there is no record in sub-report, the textbox's value is " /<you
    > entered an expression that has no value/> " in the watch window in debug
    > mode. I could not find a way around this.[/color]

    Comment

    Working...