Results 1 to 4 of 4

Thread: hiding fields

  1. #1
    Join Date
    Oct 2004
    Posts
    5

    Unanswered: hiding fields

    Is there a way to hide the visibility of a field if its record contains a null value and remain visible otherwise. Tx in advance.

  2. #2
    Join Date
    Sep 2003
    Posts
    228
    If you know vb it is easy...

    Code:
    If IsNull(me.control) Then
       me.control.visible = false
    Else
       me.control.visible = true
    EndIf
    If you are going to be doing this for every control or many controls there is a way to loop thru each control on a form but now we're getting complicated.

  3. #3
    Join Date
    Oct 2004
    Posts
    5

    hiding fields and records that have null value

    Hello,
    Actually i dont really know vb so i would appreciate it if u tellme exactly what to do and where to put this code. Tx in advance




    Quote Originally Posted by ottomatic
    If you know vb it is easy...

    Code:
    If IsNull(me.control) Then
       me.control.visible = false
    Else
       me.control.visible = true
    EndIf
    If you are going to be doing this for every control or many controls there is a way to loop thru each control on a form but now we're getting complicated.

  4. #4
    Join Date
    Sep 2003
    Posts
    228
    Quote Originally Posted by Zenia
    Hello,
    Actually i dont really know vb so i would appreciate it if u tellme exactly what to do and where to put this code. Tx in advance

    Well I don't really now what you are doing so I guess we're even

    If it is a form, put the code in the oncurrent event.

    If it is a report, put the code in the sections format event.

    substitue the word control with the name of your control. If it is a textbox named txtName then the syntax would be me.txtName.visible = false

Posting Permissions

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