Login Form To Set Permissions?
Apr 20, 2005
I have built a login form which shows or hides all tool bars depending on the
user name and password. Can I also control the other permissons like being
able to edit forms and tables? I know I can do this using the MS Access
built in functionality, but can I do it programatically from my user login
screen.
I set the tool bar visibility, close the login form and open the main
switchboard using the "on click" button of my login form. Can the above
permissions controls be done here as well?
Thanks in advance.
Peter
View Replies
ADVERTISEMENT
Mar 30, 2014
I have been searching for info with users & permission levels. I have ready a lot about ULS (User Level Security) which doesnt seem to be my answer as I do not have admin rights and I believe it is not suitable with Access 2010.
Basically I have an 2010 Access database which is used by my department as a project management tool. It has various tables, forms, queries & reports, I have created a table with user names & passwords and a login form. So when the databases opens the login form is launched & the users selects their user name & enters their password, then the main menu is shown.
Everything works really well, but as the moment there is no difference between all the users. All I want to do is to be able to make one of the Logins read only, ie if the Reviewer is logged in they can see & read every form and run every report but they can not make any edits.
View 5 Replies
View Related
Apr 17, 2015
I have a ms access application in Front End and linked tables to sql server 2008 r2 in back end.. every time I open my application the linked tables ask to me for the user and password of the sql server user of the odbc conection. I want to connect to my sql database without login every time the user open the application, I know that can be possible if I start session from vba code...
View 2 Replies
View Related
Jun 17, 2013
I have access 2010, I currently have a database in place and operational. What I am wondering is there a way to have a form come up whenever someone opens access and asks for a password and login name. Also I would like to have a 2 tier system. One for Admins and the other for users with limited access.
Is this even possible to accomplish?
View 2 Replies
View Related
Aug 13, 2007
Can anyone tell me what the ideal NTFS persmissions should be for users who are only inputting data to an Access database?
Would Read, Write, & Execute on the networked folder where the BE resides be enough for the users to update the database?
Thanks!
Michael
View 2 Replies
View Related
Aug 11, 2015
I have my application split, BE and FE. This is a form with a subform.For both I have the properties set to
Data Entry NO
Allow additions NO
Allow Deletions NO
Allow Edits NO
anyone person can open the form, but when a second person tries to open the same form we get the standard, locked by user or user does not have permission.If user 1 logs out then user 2 can get in. So it seems not a permission issue but some setting I have wrong. maybe at the query or table level?
View 6 Replies
View Related
Jun 5, 2013
I have an Access 2003 database. I have a form with 5 tabs. I want to prevent some users from editing data on some of the tabs.
I added some logic to the OPEN property of the parent form but it does not work. "Object doesn't support this property or method." What is the correct way of controlling access of the data on the tabs?
In the logic below I first determine the user's permission for each tab. If the user has read-only access they will not be allowed to edit anything on this tab. There are 50 fields on the accounting tab and a subform. If possible, I don't want to have to specify each field individually in the code. Plus there are 5 tabs with numerous fields on each.
BTW: [add designer] is the parent form and [accounting] is the tab.
If DLookup("[permission_studentacct_ReadOnly]", "Users", "Contact_ID = " & Forms![Global]![UserID]) = True Then
Forms![Add Designer].[Accounting].AllowEdits = False
Else
End If
View 3 Replies
View Related
Aug 7, 2006
Dear all,
I have an application includes one table "info" and two forms "frmlogin" & "frmwelcome".
The table "info" contains many columns, two of them are [UserName] and [PassWord]. This table is filled with three records. "frmlogin" form contains two text boxes and one button. I want the user to enter user name and the password in those two text boxes, and when clicking the button, I want the application if that user is registered or no. If yes, he/she will be moved to the "frmwelcom", that display "Welcome [UserName]".
I did it, but I don't know where my error is.
See the attached file.
Sorry for bothering you.
Thanks & Regards
Mark K.
View 2 Replies
View Related
Nov 24, 2005
Hi all
I need help with my Video rental store project the problem is that I want a security login method works with the my requirements. The manager has his own form with all the information he need and the other employees has another form.
I used this tutorial http://www.databasedev.co.uk/login.html to make the login form
the employee tables has ID, Password, Access Level
The VB code is like this
Option Compare Database
Private intLogonAttempts As Integer
Private Sub Form_Open(Cancel As Integer)
'On open set focus to combo box
Me.cboEmployeeLogOn.SetFocus
End Sub
Private Sub cboEmployeeLogOn_AfterUpdate()
'After selecting user name set focus to password field
Me.txtPassword.SetFocus
End Sub
Private Sub btnLogin_Click()
'Check to see if data is entered into the UserName combo box
If IsNull(Me.cboEmployeeLogOn) Or Me.cboEmployeeLogOn = "" Then
MsgBox "You must enter a User Name.", vbOKOnly, "Required Data"
Me.cboEmployeeLogOn.SetFocus
Exit Sub
End If
'Check to see if data is entered into the password box
If IsNull(Me.txtPassword) Or Me.txtPassword = "" Then
MsgBox "You must enter a Password.", vbOKOnly, "Required Data"
Me.txtPassword.SetFocus
Exit Sub
End If
'Check value of password in tblEmployees to see if this
'matches value chosen in combo box
If Me.txtPassword.Value = DLookup("EmployeePassword", "tblEmployee", "[EmployeeID]=" & Me.cboEmployeeLogOn.Value) Then
lngMyEmpID = Me.cboEmployeeLogOn.Value
'Close logon form and open splash screen
DoCmd.Close acForm, "frmLogon", acSaveNo
DoCmd.OpenForm "frmMainMenu"
Else
MsgBox "Password Invalid. Please Try Again", vbOKOnly, "Invalid Entry!"
Me.txtPassword.SetFocus
End If
'If User Enters incorrect password 3 times database will shutdown
intLogonAttempts = intLogonAttempts + 1
If intLogonAttempts > 3 Then
MsgBox "You do not have access to this database.Please contact admin.", vbCritical, "Restricted Access!"
Application.Quit
End If
End Sub
I am asking for two things. First I want the Manger go to his form after the login completed and all the other employees go to another form I specify.
Second if there is a way that I show the name of the Employee in the destination form by knowing his ID (passing the ID to the other form).
That’s all if any one can help please
View 2 Replies
View Related
Jul 17, 2005
hey,
can ne1 tell me how to create a User Login form in Access??? i want disply this form 1st, when i open the bd???? i am very new to Access. :)
thanks :) :)
View 3 Replies
View Related
Mar 15, 2006
I'm currently having issues with my login script on my opening form... it's supposed to close the application if it gets 3 failed attempts, but it's not closing... it just keeps giving me a popup and letting me type the password again. Here's the Code:
'Check to see if data is entered into the UserName combo box
If IsNull(Me.cboEmployee) Or Me.cboEmployee = "" Then
MsgBox "You must enter a User Name.", vbOKOnly, "Required Data"
Me.cboEmployee.SetFocus
Exit Sub
End If
'Check to see if data is entered into the password box
If IsNull(Me.txtPassword) Or Me.txtPassword = "" Then
MsgBox "You must enter a Password.", vbOKOnly, "Required Data"
Me.txtPassword.SetFocus
Exit Sub
End If
'Check value of password in tblEmployees to see if this
'matches value chosen in combo box
If Me.txtPassword.Value = DLookup("Password", "tblLogin", "[UserID]=" & Me.cboEmployee.Value) Then
lngMyEmpID = Me.cboEmployee.Value
'Close logon form and open splash screen
DoCmd.Close acForm, "frmLogin", acSaveNo
DoCmd.OpenForm "frmMainMenu"
Else
MsgBox "Password Invalid. Please Try Again", vbOKOnly, "Invalid Entry!"
Me.txtPassword.SetFocus
End If
'If User Enters incorrect password 3 times database will shutdown
intLogonAttempts = intLogonAttempts + 1
If intLogonAttempts > 3 Then
MsgBox "You do not have access to this database. Please contact admin.", vbCritical, "Restricted Access!"
Application.Quit
End If
View 6 Replies
View Related
Jun 28, 2006
I have a login form which works fine, but I would like it so that when the caret is in the password field that if the user presses Enter it will do the loginBtn_Click event.
This is what I've tried so far...
Private Sub txtPassword_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbkeyEnter Then
kecode = 0
loginBtn_Click
End If
End Sub
Any ideas or suggestions would be awesome.
View 5 Replies
View Related
Feb 16, 2013
how can I create login form that it opens on main form and if login successfully it closes and shows main form and if login unsuccessfully alert.
View 5 Replies
View Related
Feb 20, 2005
hi
i am having a login form.
where i have only two users..may be 3
suppose it is admin and guest
then i have a main form where i have 5 tabs,...where each tab contains 7 or more command buttons which will open some forms
what i need is when the admin is login he should be able to edit add delete
but if it is a guest then all the forms should be read only
i know abt the allowaddition and etc..but i don't know where to use it..
is it in the login form or in the main form or in each and every form
regards
jenson
View 1 Replies
View Related
Oct 5, 2005
Im not that expert in access programming, still have some more learning to do. anyway, my goal is to make a simple login form with a database of its users. How do I code it. The structure of my form is it has 2 unbound txtbox and 1 command button. A user will input its username and password then when the command button is clicked it will validate the user table if the data encoded is in the database. Thanks hope u can help me.
View 5 Replies
View Related
Mar 18, 2014
i have a login form in access , i want to set the value for the textbox , for example i want to set "Username" appear in the textbox when in click in the textbox clear the textbox like the title in the web it is possible !!
View 4 Replies
View Related
Aug 3, 2015
I am trying to create a multi user login form for my Access 2010 database. I will have 2 different types of users (administrator and staff). The administrator will be able to see all tables and forms and edit/ add to them. The staff will only be able to view a switchboard form and 2 forms (as well as using combo boxes to look up specific records). However, I don't want the staff to be able to view the tables or edit anything.
View 3 Replies
View Related
Apr 13, 2006
Hi Guys,
I am trying to set up a login form in my DB. I have followed the instructions from some of the previous posts on this site.
I have a table called tblUsers with 'UserId', 'UserName' and 'Password' as the fields. I also have two text boxes 'txtUserName', 'txtPassword' and a 'cmdLogin' command button on my form with the following code:
Private Sub cmdLogin_Click()
If IsNull(Me.txtUserName) Or Me.txtUserName = "" Then
MsgBox "You must enter a User Name.", vbOKOnly, "Required Data"
Me.txtUserName.SetFocus
Exit Sub
End If
'Check to see if data is entered into the password box
If IsNull(Me.txtPassword) Or Me.txtPassword = "" Then
MsgBox "You must enter a Password.", vbOKOnly, "Required Data"
Me.txtPassword.SetFocus
Exit Sub
End If
If Me.txtPassword.Value = DLookup("Password", "tblUsers", "[UserID]=" & Me.txtUserName.Value) Then
DoCmd.Close acForm, "frmLogIn", acSaveNo
DoCmd.OpenForm "frmWorked"
Else
MsgBox "Password Invalid. Please Try Again", vbOKOnly, "Invalid Entry!"
Me.txtPassword.SetFocus
End If
End Sub
Unfortunately, this code is not working in my database (MS Access 2000). I think the error occurs on the line on which it checks the password against the stored password (If Me.txtPassword.Value = DLookup("Password", "tblUsers", "[UserID]=" & Me.txtUserName.Value) Then).
I get a Run-Time error'2471' message saying "The expression you entered as a query parameter produced this error: 'The object doesn't contain the Automation object for 'smith."
NB 'Smith' is the user name entered into the login form 'txtUserName' box.
Any idea why this may occur? I would be very grateful if you could let me know please.
Thanks alot for your time. And keep up the good work guys! :)
Kind regards,
Zaf
View 2 Replies
View Related
Jan 11, 2006
hi,
i've completed the whole access DB, but now i need to implement the login form, so each user can access their data + admin access.
what is the simples/fastes way to do this, since i've got working db. I add fields (user-log-id and password)to "userTable" and now i just need simple veryfication to login and logout.
thank you in advance,
t.
View 2 Replies
View Related
Mar 12, 2014
If the database sits dormant or unused for 10 minutes the login window needs to reappear for a possible new user.
View 1 Replies
View Related
Nov 27, 2014
I have a table called 'Klanten' which contains the rows 'password' and 'login' (and several rows not needed for this form)
So I'm trying to make a login form which first checks if something is entered (this part of the code seems to work).
Private Sub Knop13_Click()
'Check to see if data is entered into Username
If IsNull(Me.Username) Or Me.Username = "" Then
MsgBox "gelieve een login in te voeren.", vbOKOnly, "Required Data"
Me.Username.SetFocus
[Code] ....
But from then on i seem to have some issues.. The part of the code underneath seems to only work for the first 'login' and 'paswoord' in my table called "Klanten".
-Username is the name for the field where they enter their 'login'.
-Password is the name for the field where they enter their 'paswoord'
If Username.Value <> DLookup("[login]", "Klanten", "[Username]='" & Username & "'") Then
MsgBox "Invalid Username. Please try again.", vbOKOnly, "Invalid Entry!"
Exit Sub
End If
If Password.Value <> DLookup("[wachtwoord]", "Klanten", "[Password]='" & Password & "'") Then
MsgBox "Invalid Password. Please try again.", vbOKOnly, "Invalid Entry!"
Exit Sub
End If
Then as last part i would like to goto another form called 'Mainmenu' if both the Login and the Paswoord is correctly entered in the fields Username and Password. Here i have the most issues as this doesn't seem to do anything at the moment
If Password.Value = DLookup("[wachtwoord]", "Klanten", "[Username]='" & Username & "'") And Username.Value <> DLookup("[login]", "Klanten", "[Password]='" & Password & "'") Then DoCmd.OpenForm "Mainmenu"
End Sub
View 1 Replies
View Related
Nov 16, 2013
I have a fully functioning frmLogin that appears when the database opens. After correctly logging in, it takes you to the appropriate switchboard. The problem is that I set autokeys to allow F1 to automatically open the switchboard, but I don't want users to hit this to bypass my login screen. The reason for keeping the switchboard open is to force the user to close the database using the switchboard(eventually I want to limit the user to only the forms that I have created in a split database).
My other option that I tried first was writing a module that would detect when all forms are closed, then open the switchboard. But I kept getting Error91 and got frustrated/stopped attempting this method. Using the hotkey gives the user a similar functionality, but less conveniently so(since its not an automated process, etc.).
View 4 Replies
View Related
Sep 4, 2013
I have a table called "tblEmployees" with columns "EmpName, EmpPassword, strAccess" in my table
The login form works but I wanted the user to go to a specific form that would be designated under strAccess
I have this code but it totally wrong to what I want it to do but not sure where to start
'Close logon form and open relevent page
Dim stDocName As String
stDocName = Forms!CopyfrmLogon!cboEmployee.Column(3)
DoCmd.OpenForm stDocName
[Code] ....
"stDocName = Forms!CopyfrmLogon!cboEmployee.Column(3)" - this is the line that needs to be debugged ... I need something that says open form specified in the the column "strAccess" of the "tblEmployee" tables
View 5 Replies
View Related
Jan 3, 2015
i have created a login page and i have coded it but i do not know to set coding up so that it results in a linked form to open up..( main menu)
View 8 Replies
View Related
Jun 23, 2015
I am doing a login form for my database using online references and videos.
Below is the code for my login form.
Private Sub Form_Load()
Dim Security As Integer
Me.txtUser = Environ("USERNAME")
If IsNull(DLookup("UserSecurity", "Userslist_table", "[UserLogin]='" & Me.txtUser & "'")) Then
MsgBox "No Usersecurity set up for this user. please contact the Admin", vbOKOnly, "Login info"
[Code] ....
End Subi am facing problem for run-time error type mismatch '13': i have listed below field names which is used in above coding.
UserSecurity_table
[SecurityID] is Autonumber field
[SecurityLevel] is Text field
Userlist_table
[UserID] is autonumber field
[Username] is text field
[Userlogin] is text field
[Usersecurity] is text field
[Password] is text field
View 13 Replies
View Related
Nov 27, 2014
Into the form named: Administratorsfrm, I added a textbox defined as usertxt and also a textbox named passwordtxt as well as a button named logincmd.
The user defined is the Network user and this is added automatically to the usertxt field everytime when I open the Administratorsfrm form. To do this I use the next code:
Private Sub Form_Open(Cancel As Integer)
Dim wshNetwork As Object 'New wshNetwork
Set wshNetwork = CreateObject("WScript.Network")
Me.Usertxt = wshNetwork.UserName
Set wshNetwork = Nothing
End Sub
I would like that the user types his/her password (Network password or Unlocking computer) and after this could Login to the database application. I mean, the user will type his password and then the event should compare the password typed with the network password or unlocking password and if this is correct should open the database application (Main Menu Form: Mainfrm)
View 4 Replies
View Related