Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Aug 2005
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Option box (Access 2000)

    Can you help me build properly the conditions of the 2 option boxes namely bank and Monaten

    1 condition: choose neither Monaten no Bank
    2 condition choose only Monaten
    3 condition choose both Bank and Monaten

    the folloiwng code is wrong and I will be gratful for any help

    If IsNull(Forms![Main]!Bank) And IsNull(Forms![Main]![Monaten]) Then
    Me.RecordSource = BasT
    ElseIf IsNull(Forms![Main]!Bank) And IsNotNull(Forms![Main]![Monaten]) Then
    Me.RecordSource = BasU
    ElseIf IsNotNull(Forms![Main]!Bank) And IsNotNull(Forms![Main]![Monaten]) Then
    Me.RecordSource = Bas
    End If

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

    Re: Option box (Access 2000)

    An option button is either True or False, so try

    If Forms![Main]!Bank = False And Forms![Main]![Monaten] = False Then
    Me.RecordSource = BasT
    ElseIf Forms![Main]!Bank = False And Forms![Main]![Monaten] = True Then
    Me.RecordSource = BasU
    ElseIf Forms![Main]!Bank = True And Forms![Main]![Monaten] = True Then
    Me.RecordSource = Bas
    End If

Posting Permissions

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