Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Visible controls (Access 2000)

    I want to make visible and invisible controls starting with List,List2,etc. When i try to call the function with check = False i get the message arument not optional.Where is my mistake?

    Private Function Check(OnOff As Boolean)
    Dim i As Integer
    For i = 18 To 2
    Me.Controls("[list]").Visible = OnOff
    Next i
    End Function

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Visible controls (Access 2000)

    You don't call a function with Check = False. You call it like this: Check(False)
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

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

    Re: Visible controls (Access 2000)

    In addition to Mark's reply, there is no need for this to be a function, since it doesn't return a value. It might as well be a procedure (sub).

Posting Permissions

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