Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Cheltenham, Gloucestershire, England
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    text boxes visible when another contains data (2000 database (in 2003 soft

    I have form with text fields containing two sets of address detail ( e.g. [Dev_[PostCode], [Estate_Man_PostCcode], [Dev_Email], [Est_Man_Email). When a date is entered in a date field (sales_office_occupied) I want to make one set not visible and the other set visible.
    Thanks
    Regards roberta

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

    Re: text boxes visible when another contains data (2000 database (in 2003

    You can use code in the After Update event of the date text box and in the On Current event of the form. For example (adapt as needed):

    Private Sub ShowHide()
    If IsNull(Me.sales_office_occupied) Then
    Me.Dev_PostCode.Visible = True
    Me.Estate_Man_PostCode.Visible = True
    Me.Dev_Email.Visible = False
    Me.Est_Man_Email.Visible = False
    Else
    Me.Dev_PostCode.Visible = False
    Me.Estate_Man_PostCode.Visible = False
    Me.Dev_Email.Visible = True
    Me.Est_Man_Email.Visible = True
    End If
    End Sub

    Private Sub Form_Current()
    ShowHide
    End Sub

    Private Sub Form_AfterUpdate()
    ShowHide
    End Sub

  3. #3
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Cheltenham, Gloucestershire, England
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: text boxes visible when another contains data (2000 database (in 2003

    Thanks - easy whey you know how!!!!

    Regards
    Roberta

Posting Permissions

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