machine level security

G

Guest

Hello,
I have user level security in place and working nicely. However, in addition
to that, I would like to implement 'workstation level' security, meaning if
users need to perform certain tasks, they will need to be logged onto a
certain workstation to do it. Is this possible and if so, how?

A related question: our office has a specific once-a-day task where a user
needs to alter the data in a form and "submit" it. It is then collected by
the administrator and the data, time, date and user who submitted it are
verified. What's the best way to do this?
Thanx to all who can help,
Ripper T
 
J

Jack MacDonald

Access' security, which applies at the database engine level, can deal
only with users. To deal with computer names, you will need to work at
the application, or program, level. In other words, if somebody opens
your database tables directly, they can make any modifications for
which they are granted permission, regardless of the computer that
they are using.

Having said that, you can use a function found at
http://www.mvps.org/access/api/api0009.htm
to retrieve the name of the computer that is running the application.
Your application could apply logic to, say, close the form unless the
designated computer was being used.

The CurrentUser() function returns the name of the user who is
currently logged onto Access. You can place code into the BeforeUpdate
event of your forms to populate fields in your tables with the values
returned by CurrentUser() and Now().




Hello,
I have user level security in place and working nicely. However, in addition
to that, I would like to implement 'workstation level' security, meaning if
users need to perform certain tasks, they will need to be logged onto a
certain workstation to do it. Is this possible and if so, how?

A related question: our office has a specific once-a-day task where a user
needs to alter the data in a form and "submit" it. It is then collected by
the administrator and the data, time, date and user who submitted it are
verified. What's the best way to do this?
Thanx to all who can help,
Ripper T


**********************
(e-mail address removed)
remove uppercase letters for true email
http://www.geocities.com/jacksonmacd/ for info on MS Access security
 
G

Guest

Can you help me with how to use this function. I want to be able to use it in
such a way that a form will only open if machine = x. Is that possible?

Thanx,

Rip
 
J

Jack MacDonald

Yes, it is possible.

I presume a basic understanding of programming using VBA. If you do
not have that understanding, then you will need to brush up on those
skills.

Open a new module and paste the code from the website that I
mentioned. Save the module.

Open the form in design view.

Open the forms OnOpen event -- you can find it in the Events tab of
the form's properties. Enter code similar to this

Private Sub Form_Open(Cancel as Integer)
If fOSMachineName <> "TheCorrectMachineName" Then
MsgBox "You cannot use this form on this computer"
Cancel = True
end if
End Sub




Can you help me with how to use this function. I want to be able to use it in
such a way that a form will only open if machine = x. Is that possible?

Thanx,

Rip


**********************
(e-mail address removed)
remove uppercase letters for true email
http://www.geocities.com/jacksonmacd/ for info on MS Access security
 
L

Lynn Trapp

As Jack said, the code can be used in that way. However, I think you should
ask yourself whether or not this is really a good idea. For example, let's
say you distribute your application to User1 to be used on machine "User1."
This person uses the application for a month or 2 and is just getting
accustomed to it. Now, something goes wrong with machine "User1" and the IS
department needs to take it to their lab to work on it. They give User1
another computer to use while they fix the machine "User1", we'll call this
new computer "User2." User1 tries to open the form that he has become
accustomed to using and gets a message that he can't use the form on this
computer. You now have an upset user who doesn't want to use your
application any more.
 
R

RipperT

Please see my first post in this thread. I need each form to be secure until
the info can be verified. Maybe there is a better way?

thanx

Rip
 
L

Lynn Trapp

Well, since a form is merely a "window" to the data I don't think preventing
multiple users from opening a form simultaneously will do what you want. You
may wan to consider having the user open the database exclusively, but I
really don't think you need that either. Are you trying to keep a user from
adding any additional data until everything has been confirmed? If so, then
you simply need to add a confirmed flag to your table and not allow a user
to see the additional data until the confirmed flag has been set to yes by
the administrator.
 
R

RipperT

Jack,

I get a:

runtime error '453': Can't find DLL entry point GetComputerNameA in kernel
32

Any idea what that means?

Thanx

Rip
 
R

RipperT

I am unable to get a network connection to the site from my work machine, I
have to type it. Is that a space between alias and the undescore?

Thanx,

Rip
 
D

Douglas J. Steele

Yes it is. When _ is used as a line continuation character, it must always
be preceded with a space.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



RipperT @comcast.net> said:
I am unable to get a network connection to the site from my work machine, I
have to type it. Is that a space between alias and the undescore?

Thanx,

Rip
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top