Wherein Wayne Wallace solves two problems in one question: finding out whether a user can access a form and configuring a switchboard to access only the permitted forms. Not content with what the customer asks for, he provides an even better solution. Wayne then looks at two issues in SQL: non- normalized data and logical Nots.
I was asked to convert a non-Access database made by a
large development company. Their interface was set up so
that when a user signs in, the program checks the user’s
rights and opens the switchboard with only those items
that the user can access. Also, the push buttons on the
interface were sorted, leaving no gaps on the main form.
Is it possible to create this kind of interface for an Access
database, and, if the answer is positive, is there a short way
to describe the procedure?
There are really two problems here:
• Determining the user’s permissions
• Managing the switchboard
And I don’t have a short way to describe anything.
I’ll start with determining the user’s permissions. For
this discussion, I’ll assume that you’re re-creating the
application in Jet, which lets me avoid discussing SQL
Server security. This actually isn’t much of a limitation.
From a switchboard, you’re really looking at what forms
your users can open. So I’m going to focus on managing
the security for your application’s forms, which are a
constant between Jet and SQL Server applications.
Of course, Access security can cover more than the
forms in your application. It doesn’t do your users much
good, for instance, to give them rights to open a form and
deny them rights to the table that the form depends on.
So, I’m also going to assume that you’ve coordinated
the security settings among all of your Access objects
so that controlling access to your forms is a reasonable
thing to do.
With the problem sufficiently limited so that I can
give you an answer, the first step is to retrieve the security
permissions for a particular form. DAO provides the
1. From the Container’s collection of the CurrentDB,
access the Forms container.
Read more in this pdf