Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2003
    Posts
    15

    Unanswered: Null Values on Forms

    Heyas:

    My simple problem is that I have a form where sometimes the values have to be Null, and appear blank in Print View on the form. I simply wish to make these Null values APPEAR as something like '****' on the printed version of the form, meanwhile keeping the Null value the same on the table. How do I go about accomplishing this? My thanks in advance for your time!!

  2. #2
    Join Date
    Nov 2002
    Location
    San Francisco
    Posts
    251
    the easiest way is to stick on the report functions instead of values. You can have one function and call it or you can have on each field separate function. Better would be to have one function, cauze if you change your mind and don't like * anymore, you can replace it easily with -


    put this function to modules

    Public Function MyNullValue(InputValue As Variant) As Variant

    If IsNull(InputValue) Then
    MyNullValue = "*****"
    Else
    MyNullValue = InputValue
    End If

    End Function


    then you can use it on your report, instead of each field, put to CONTROL SOURCE
    =MyNullValue([MyField])

    don't forget that the NAME of the TEXT BOX has to be different than the name of the table field!

    so if your field is MYFIELD, textbox name can be let's say MyFieldNull but not MyField


    jiri

  3. #3
    Join Date
    Jan 2003
    Posts
    15
    Very cool, my thanks for the coding...

    But is there no way I can do it with the formatting? I have multiple reports each with 40 + fields on it that can be Null, I am not looking forward to going in and redoing each field :/

    Again however thanks for replying, this certainly helps!

  4. #4
    Join Date
    Nov 2002
    Location
    San Francisco
    Posts
    251
    the other way is to change input query for each report....

  5. #5
    Join Date
    Jan 2003
    Posts
    15

    Red face

    Mmm? How is that?

    I am going through the report and it appears if I wanted to play with the module idea I would basicaly have to redesign the report

  6. #6
    Join Date
    Jan 2003
    Posts
    15
    The other thing I neglected to mention is that some values are reliant on what the other values are, thus If I fully replace a Null Value with stars then it hoses up other reliant values. That is why I am looking for a masking technique of some type, so that the printed report shows '****' for a placeholder instead of the raw blank area, however the value on the query is still Null.

Posting Permissions

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