Results 1 to 7 of 7
  1. #1
    3 Star Lounger
    Join Date
    Jul 2001
    Posts
    280
    Thanks
    0
    Thanked 0 Times in 0 Posts

    invisible table with code (Access 2000)

    Can i make a ttable invisible through a code ? Say in the OnOpen event of a form? I can do it by ticking off the options, but i want to know#how can i do it
    with a code

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: invisible table with code (Access 2000)

    What are you trying to accomplish and why do you want to do it from a form? Do you want to set the hidden property of the table to true or turn of the option setting to show hidden objects? If you provide more information, someone should be able to help.
    Charlotte

  3. #3
    3 Star Lounger
    Join Date
    Jul 2001
    Posts
    280
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: invisible table with code (Access 2000)

    Thank you for your reply.I want to set the hidden properrty of the tables to true.The point is that my programme is used on other
    computers and therefore i have not the possibiliuty to use the option show hidden objects,which is the easiest way.
    Therefore i have to do it by code and on opening the database to have my tables hidden.
    regards

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: invisible table with code (Access 2000)

    Sorry, but I still don't quite understand. Unless you use Access security on your application, there will be nothing to stop anyone on a machine with Access installed from unhiding those tables again. Are you trying to hide the tables themselves or the database window?
    Charlotte

  5. #5
    2 Star Lounger
    Join Date
    Nov 2002
    Posts
    160
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: invisible table with code (Access 2000)

    u can hid a table by that code in the on open event to the form .
    CurrentDb.TableDefs("table1").Attributes = dbHiddenObject
    change table1 to ur table name.
    Ashraf

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

    Re: invisible table with code (Access 2000)

    Doing it that way might be dangerous, since you are overwriting any existing attributes. A safer way would be like this:

    With CurrentDb.TableDefs("table1")
    .Attributes = .Attributes Or dbHiddenObject
    End With

  7. #7
    3 Star Lounger
    Join Date
    Jul 2001
    Posts
    280
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: invisible table with code (Access 2000)

    That is exactly what i wanted. Superb !!!!

Posting Permissions

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