Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Burgas, Bulgaria
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Filter in form (Access 2000)

    ay i ask for an advice as to the best and shortest way to filter a form according to the
    small attachement? It consists of one table and one field only and the record source should depend on
    the choice in the option group.I imagine that the filter should depend on the id of the table

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

    Re: Filter in form (Access 2000)

    If I understand your question correctly, you do not want to filter the form, but you want to change the control source of the text box.

    You must give the text box another name, since you want to use it for more than one field. Name it for example txtMemo.

    Create an After Update event procedure for the Office option group:

    Private Sub Office_AfterUpdate()
    Select Case Office
    Case 1
    Me.txtMemo.ControlSource = "So"
    Case 2
    Me.txtMemo.ControlSource = "Va"
    Case 3
    Me.txtMemo.ControlSource = "Bl"
    Case 4
    Me.txtMemo.ControlSource = "Ha"
    Case 5
    Me.txtMemo.ControlSource = "Pl"
    Case Else
    MsgBox "Selection not valid!", vbCritical
    End Select
    End Sub

  3. #3
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Burgas, Bulgaria
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Filter in form (Access 2000)

    thank you. That is what i wanted.

Posting Permissions

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