Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Record Based Security 1

Status
Not open for further replies.

tryfekid

Programmer
Aug 16, 2001
9
US
I've seen the FAQ related to this, but it hides the records. I need mine to be shown but uneditable.

I need to know if this is possible, and how to implement it:

I have a form, and in the form, there is a field for USER. The USER field will hold the userID of person who created the record. Therefore, the record is only editable if the userID of the person matches the data in the field USER.

For example,

Record, USER, other stuff...
1, John, other stuff....
2, Mike
3, John
4 ,Bobby

If John logs in with userID John, then he only can edit records 1 and 3 and can read only records 2 and 4.

Thanks, Any help is appreciated


 
Try the following in the form's OnCurrent event:
Code:
If CurrentUser = Me!USER Then
  Me.AllowDeletions = True
  Me.AllowEdits = True
Else
  Me.AllowDeletions = False
  Me.AllowEdits = False
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top