well, not sure if the title is correct ._.
here's my code, i use 2 forms Login and Menu
Login Code:
what i want is after logging via the Login Form. in the Menu it should write "Welcome, "username"" but i don't know what to search in google. so i need your helpCode:Private Sub cmdLogin_Click() '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 to see if this 'matches value chosen in combo box If Me.txtPassword.Value = DLookup("password", "tblUsers", _ "[ID]=" & Me.cboUsername.Value) Then ID = Me.cboUsername.Value 'Close logon form and open loginmenu form DoCmd.Close DoCmd.OpenForm "LoginMenu" Else MsgBox "Password Invalid. Please Try Again", vbOKOnly, _ "Invalid Entry!" Me.txtPassword.SetFocus End If
There isn't any code in Menu just macros to link to other forms
is there anyway to code it example:
Username :staff (staff only have Read-Only permission)
if i log in using "staff" from Login form, in Menu Form, after clicking on any of the forms "staff" won't be able to edit anything and it's only "staff" that is read-only when other username is logged in, they are able to edit it.
Me.AllowEdits = false
Me.allowaddition = false
Thanks in advance





