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

    controls with successive numbers (Access 2000)

    I have controls with successive numbers, as list1,list2,list3 etc how could i make them all invisible and make visible only 2 of them.For example
    if CustomerID = 123 then
    me.list1.visible = True
    Elseif customer = 412 Then
    Me!List 3.Visible = True
    Then the problem remains that all other items must be made invisible again

  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: controls with successive numbers (Access 2000)

    Make then all invisible before running the code you showed us.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

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

    Re: controls with successive numbers (Access 2000)

    Thank you. Since i have about 20 items,how could i make them invisible with the help of for each functionI do not know how to apply it

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

    Re: controls with successive numbers (Access 2000)

    If they are names List1, List2, List3 etc. you can use code like this:

    Dim i As Integer
    For i = 1 To 20
    Me.Controls("List" & i).Visible = False
    Next i

  5. #5
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: controls with successive numbers (Access 2000)

    Thank you ! works fine !

Posting Permissions

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