• invisible table with code (Access 2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » invisible table with code (Access 2000)

    Author
    Topic
    #411694

    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

    Viewing 1 reply thread
    Author
    Replies
    • #894372

      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.

      • #894427

        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

        • #894433

          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?

          • #894522

            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

            • #894524

              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

            • #894723

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

            • #894724

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

            • #894525

              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

          • #894523

            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

        • #894434

          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?

      • #894428

        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

    • #894373

      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.

    Viewing 1 reply thread
    Reply To: invisible table with code (Access 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: