Individual security

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

Guest

I have a few questions, but a little background first. I have created a
database for 13 users. Each user has a login and a password, and that is
working fine. The database opens to a form that the user has to fill out.
It has 5 tabs on the form to fill out. The only other thing they need to do
is run some reports. They can also do that without any problems. The users
can go in and create a new record as anybody. That's the problem.

1. Is there a way to make the database only show the records that the user
is working on? There is a drop-down in the form to select the user when they
create a new file. When they open the database they can see everybodies
files. I need it to only show the files that they are assigned to.

2. There is also an open/close drop-down option on the form. Is there a
way to lock the record so it can't be edited after "close" has been selected?
They still need to be able to run the reports and see all the information
that way though. (ie. See reports with other users records as well as their
own whether the record is closed or not.)

Thanks, any help would be greatly appreciated.
 
Cheyenne said:
I have a few questions, but a little background first. I have created a
database for 13 users. Each user has a login and a password, and that is
working fine. The database opens to a form that the user has to fill out.
It has 5 tabs on the form to fill out. The only other thing they need to
do
is run some reports. They can also do that without any problems. The
users
can go in and create a new record as anybody. That's the problem.

1. Is there a way to make the database only show the records that the
user
is working on? There is a drop-down in the form to select the user when
they
create a new file. When they open the database they can see everybodies
files. I need it to only show the files that they are assigned to.

You need to have the user's identity recorded when they create a new record.
This is simple. Create a new text field in the main table and call it
something meaningful like UserName. Next, use the following function as the
default value for that field.

http://www.mvps.org/access/api/api0008.htm

You can then select the required records for each user in SQL code when the
form opens.
2. There is also an open/close drop-down option on the form. Is there a
way to lock the record so it can't be edited after "close" has been
selected?

Yes, in the form's current event:

If Me.cboMyComboBox = "Closed" Then
Me.AllowEdits = False
Else
Me.AllowEdits = True
End If


HTH - Keith.
www.keithwilby.com
 
Thank you- What a big help!!
--
Cheyenne


Keith Wilby said:
You need to have the user's identity recorded when they create a new record.
This is simple. Create a new text field in the main table and call it
something meaningful like UserName. Next, use the following function as the
default value for that field.

http://www.mvps.org/access/api/api0008.htm

You can then select the required records for each user in SQL code when the
form opens.


Yes, in the form's current event:

If Me.cboMyComboBox = "Closed" Then
Me.AllowEdits = False
Else
Me.AllowEdits = True
End If


HTH - Keith.
www.keithwilby.com
 
Back
Top