How can I hide tables ...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I know that if I right click on an access object (such as a table), I can
mark the 'hidden' attributes checkbox to hide that object in the properties
dialog box. How can I use VBA code to do this?

thanks!!!
 
BB programmer said:
Hello,

I know that if I right click on an access object (such as a table), I can
mark the 'hidden' attributes checkbox to hide that object in the
properties
dialog box. How can I use VBA code to do this?

thanks!!!

BB - I used a technique called 'Ultra Hidden Tables' shown (I believe though
the memory is somewhat hazy) in David Grohs' Access 97 Power Toolkit.

This technique allows you to address the table in code but unless you know
the actual name of the table you wont find it - even in an unsecured Db.

I am not at my PC right now so cant give you the code but I guess someone on
this board will be able to research that for you - or Amazon has copies of
the book real cheap!

If you don't have a result by Monday post again and I'll dig it up for you.

Cheers

Kahuna
 
BB programmer said:
Hello,

I know that if I right click on an access object (such as a table), I can
mark the 'hidden' attributes checkbox to hide that object in the
properties
dialog box. How can I use VBA code to do this?

thanks!!!

Why would you want to do this? Can't you just hide the db window on
startup? All data manipulation by your users should be via forms/queries.

Regards,
Keith.
www.keithwilby.com
 
It's *Mr* Wilby to you <wink>. My original comment is still valid - give
your users forms and hide the db window. Most query functionality can be
mimicked using Access filtering tools, those that can't (union queries and
the like) you could provide bespoke forms and reports for.

Your original question asked how to use code to hide the tables, but if you
allow users access to the db window then you can't run any startup code
because no event will fire. Granted, you could use a command line macro but
this could be defeated by using the bypass key at startup. And even if you
did code the hiding of tables, what's to stop your users unhiding them?

It sounds to me like you may need to invoke user-level security to achieve
your objective, but that's a whole other subject.

Regards,
Keith.
 
Keith Wilby said:
It's *Mr* Wilby to you <wink>. My original comment is still valid - give
your users forms and hide the db window. Most query functionality can be
mimicked using Access filtering tools, those that can't (union queries and
the like) you could provide bespoke forms and reports for.

Your original question asked how to use code to hide the tables, but if you
allow users access to the db window then you can't run any startup code
because no event will fire. Granted, you could use a command line macro but
this could be defeated by using the bypass key at startup. And even if you
did code the hiding of tables, what's to stop your users unhiding them?

It sounds to me like you may need to invoke user-level security to achieve
your objective, but that's a whole other subject.

Regards,
Keith.
Hello Keith,

Many thanks for your suggestion! Now I understand hiding the db windows is
one way to protect the data. As I'm new on setting user security, can I set
user security so that the user can only access the tables through my access
program, but not able to access the tables by other means (such as open
another access session and import the table from the original mdb file?)
 
BB programmer said:
Hello Keith,

Many thanks for your suggestion! Now I understand hiding the db windows is
one way to protect the data. As I'm new on setting user security, can I
set
user security so that the user can only access the tables through my
access
program, but not able to access the tables by other means (such as open
another access session and import the table from the original mdb file?)

Yes you can and it's a long slog but is worth it in the end. Read the MS
FAQ on Access security (link on my site), then read it again, then have a go
at securing a *copy* of your file. You'll make mistakes, lock yourself out,
think your file is secure when it's not and get very frustrated, but once
the penny drops you'll have a powerful feature of Access at your disposal.

Good luck!
Keith.
www.keithwilby.com
 
Back
Top