Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Jun 2003
    Posts
    238
    Thanks
    0
    Thanked 0 Times in 0 Posts

    If blank... (Access 2000)

    I have a form and I want a text box to say N/A if its left blank, but I don't want it to default N/A?

    Thanks to All,
    Jordan

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: If blank... (Access 2000)

    Do you mean that it can be empty initially, but if the user clears it after it has been filled before, it should read N/A? You may do that in the AfterUpdate event of the text box:

    Private Sub txtSomething_AfterUpdate
    If IsNull(Me.txtSomething) Then
    Me.txtSomething = "N/A"
    End If
    End Sub

    If this is not what you meant, post back with more information.

  3. #3
    3 Star Lounger
    Join Date
    Jun 2003
    Posts
    238
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: If blank... (Access 2000)

    Actually I want it to do this once i click a button to take me to a report preview

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: If blank... (Access 2000)

    You can put a text box on the report with control source =Nz([MyField], "N/A") where MyField is the field name. The Nz function replaces null values in the field specified in the first argument by the value provided in the second argument.

Posting Permissions

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