keep text hidden when form reopens

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • liverbarry
    New Member
    • Nov 2007
    • 16

    keep text hidden when form reopens

    Hi
    I think this will be a quick one.
    I'm working on access 2000

    In a form I have used a label directly over a text box in which there instructions on what type of information should be put into the text box. I can get the label to disappear using

    Private Sub Comments_AfterU pdate()
    Me.Label25.Visi ble = False

    End Sub

    the problem is when I reopen the record Label25 is visible again
    I need to make it stay invisible if there is data in Comments field.

    hope this makes sense
    Thanks
  • DonRayner
    Recognized Expert Contributor
    • Sep 2008
    • 489

    #2
    Originally posted by liverbarry
    Hi
    I think this will be a quick one.
    I'm working on access 2000

    In a form I have used a label directly over a text box in which there instructions on what type of information should be put into the text box. I can get the label to disappear using

    Private Sub Comments_AfterU pdate()
    Me.Label25.Visi ble = False

    End Sub

    the problem is when I reopen the record Label25 is visible again
    I need to make it stay invisible if there is data in Comments field.

    hope this makes sense
    Thanks
    In the "On Current" event for your code you need to add something like this

    Code:
    If Me.Comments > "" then
        Me.Label25.visible = false
    Else
        Me.Label25.visible = true
    End If

    Comment

    • liverbarry
      New Member
      • Nov 2007
      • 16

      #3
      Great, thanks for your quick reply

      Comment

      • DonRayner
        Recognized Expert Contributor
        • Sep 2008
        • 489

        #4
        You're welcome, glad I could help

        Comment

        Working...