Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2004

    Unanswered: Hiding fields on a form based on a combobox value

    I have a tabbed form that with 4 fields. One being a yes or no combo box. IF the combo box is yes, then show all my fields, other wise I want them hidden.

    I have some code but it just hides the fields. but it doesn't changed based on my combo box answer. can you help please!!!

    Am I using the wrong event?

    here is my code...

    Private Sub Form_Load()
    On Error GoTo ErrorSection

    If [SecureID] = "No" Then
    Me![SecurIDNbr].Visible = False
    Me![SecIDDate Acquired].Visible = False
    Me![SecIDExpiration Date].Visible = False
    Me![SecIDSurrender Date].Visible = False
    Me![SecurIDNbr].Visible = True
    Me![SecIDDate Acquired].Visible = True
    Me![SecIDExpiration Date].Visible = True
    Me![SecIDSurrender Date].Visible = True

    End If

    Exit Sub

    MsgBox Err.Description
    Resume ExitSection
    End Sub

  2. #2
    Join Date
    Apr 2004
    metro Detroit
    Put your code in the OnCurrent event of the form.

Posting Permissions

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