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

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » text boxes visible when another contains data (2000 database (in 2003 soft

    Author
    Topic
    #431724

    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

    Viewing 0 reply threads
    Author
    Replies
    • #1011092

      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

    Viewing 0 reply threads
    Reply To: text boxes visible when another contains data (2000 database (in 2003 soft

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: