access 2003, create a form that allows you to search for an employee and to edit you have to have permission

5 pts.
Tags:
Access 2003
Access 2003 forms
Microsoft Access 2003 permissions
How to create a form that allows you to search and edit if you have permisson. I don't want the information to be edited if the person viewing doesn't have permission
ASKED: June 15, 2010  1:21 AM
UPDATED: June 17, 2010  7:18 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • mgj
    Maybe something like this..... In Module »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»Option Compare Database Option Explicit Declare Function WNetGetUser Lib "mpr" _ Alias "WNetGetUserA" (ByVal lpName As _ String, ByVal lpUserName As String, _ lpnLength As Long) As Long Public Function UserID() As String Dim sUserNameBuffer As String * 255 sUserNameBuffer = Space(255) Call WNetGetUser(vbNullString, _ sUserNameBuffer, 255&) UserID = Left$(sUserNameBuffer, _ InStr(sUserNameBuffer, _ vbNullChar) - 1) If UserID = "" Then UserID = "default" End Function »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»» In Form »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»» Option Compare Database Option Explicit Dim dbCurrent As Database Dim rsFilter As Recordset Dim strUser As String Dim strSQLFilterAs String Const cSomeInteger = 1 Private Sub Form_Load( Dim strSQLFilter as String Set dbCurrent = CurrentDb() strUser = UserID strSQLFilter = "SELECT WINUSER_ID, PERMISSIONS " & _ "FROM SomeTable IN '\SOME-SERVERSome_Access_DB.MDB' " & _ "WHERE WINUSER_ID = '" & strUser & "'" Set rsFilter = dbCurrent.OpenRecordset(strSQLFilter) IF rsFIlter!PERMISSIONS < cSomeInteger THEN me.AllowEdits = False END IF
    320 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following