disable record selecting in access

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

Guest

I have a table with sensitive information - Social security, address, phone
numbers, etc. I also have a data entry form that many users will use to enter
their information, and I am trying to eliminate the user from seeing other
records but allowing them to search for theirs. I have set the form to open
to a new record automaticly when it is open (no data given away there), the
mousewheel also goes to a new record when selected (again no information
given away). The user can input their information and exit the application
fine. The problem is searching.

When the filter by form button is pressed, combo boxes appear which contain
information that is potentially hazardous to give out to the general public,
and i would like to know how to get rid of those combo boxes during the
filter by form function. Also, when you exit the filter by form function you
can scroll through records. Yikes! I don't want either of these conditions to
prevail. Also, the search item tends to enter a new record as you type before
clicking on the filter by form button. I just want the form to find a record
based on a user's information, update the form and be done with it. I think I
will start by copying the form and using one version of the form for inputing
data and another version of the same form for updating data. Otherwise, can
anyone help?
 
Bill_M said:
I have a table with sensitive information - Social security, address, phone
numbers, etc. I also have a data entry form that many users will use to
enter
their information, and I am trying to eliminate the user from seeing other
records but allowing them to search for theirs. I have set the form to
open
to a new record automaticly when it is open (no data given away there),
the
mousewheel also goes to a new record when selected (again no information
given away). The user can input their information and exit the application
fine. The problem is searching.

When the filter by form button is pressed, combo boxes appear which
contain
information that is potentially hazardous to give out to the general
public,
and i would like to know how to get rid of those combo boxes during the
filter by form function. Also, when you exit the filter by form function
you
can scroll through records. Yikes! I don't want either of these conditions
to
prevail. Also, the search item tends to enter a new record as you type
before
clicking on the filter by form button. I just want the form to find a
record
based on a user's information, update the form and be done with it. I
think I
will start by copying the form and using one version of the form for
inputing
data and another version of the same form for updating data. Otherwise,
can
anyone help?

You first need a method of recording the user's identity against each
record. Depending on how you've set up security you can use either the
CurrentUser property or the user's network ID (if you search this group
you'll find a link to some code that will do this).

Once you have your records complete with user ID you then need to limit each
user to their own records. This can be done in your form's Open event, eg:

Dim strUser as String, strSQL as String
strUser = CurrentUser() '** Or you could use the network ID **
strSQL = "Select * from tblMyTable Where [UserID] = " & strUser
Me.RecordSource = strSQL

Note that you'll also have to close any other back door methods of getting
to other users' data, such as default menus and startup settings. It's not
a trivial job.

I must also point out that Access isn't really a good platform for the
storage of sensitive data - good as it is, Access security can be broken by
a determined hacker, so you'd have to assess what risk you have with your
users and/or intruders.

HTH - Keith.
www.keithwilby.com
 
Back
Top