Yes. You will want to have a field in your table that identifies the user
who created the record. Then in the Form Current Event, you can set the
form's properties to either allow or disallow certain functions. I have
also included an API call that will return the user's Windows login name,
not the Access Security name.
This code goes in a standard module by itself. Mine is named modGetUserAPI.
Private Declare Function GetUserNameA Lib "Advapi32" (ByVal strN As String,
ByRef intN As Long) As Long
Public Function GetUserID()
Dim Buffer As String * 20
Dim Length As Long
Dim lngresult As Long, userid As String
Length = 20
lngresult = GetUserNameA(Buffer, Length)
If lngresult <> 0 Then
userid = Left(Buffer, Length - 1)
Else
userid = "xxxxxxx"
End If
GetUserID = UCase(userid)
End Function
------------
Now, the current event.
Dim blnMyRecord As Boolean
blnMyRecord = GetUserID = Me.txtUser
With Me
.AllowEdits = blnMyRecord
.AllowDeletions = blnMyRecord
End With
Tempuser via AccessMonster.com said:
Thank You for the below reply.
I have 14 users with the same data as mentioned below:
(Sr No
Account Handled by
Customer Name
Customer requirements
OrderDate
Customer contract start date
customer region) what I want is the individual user must have edit rights
only to his records and readonly access to the remaining 13 users
details.Can
u help with some other solution how should I proceed.Your help in this
regards is appreciable
Why are you doing that?
Why not just use a multi user split database application?
Any other jury rigged way is just folly.
If you can explain you logic for the approach, I will be happy to help you
through it.
[quoted text clipped - 8 lines]