Thank you so much. I found the solution. Before I start checking the userlevel, I am closing the form using the code DoCmd.Close and I deleted that and its working fine.
Thanks!!! :)
Coding in OK button:
If UserLevel = 1 Then
DoCmd.OpenForm "Calender"
Forms![Calender]![txtuser] = Me.txtlogin
Forms![Calender]![txtpwd] = Me.txtpassword
So, Once the calender form opens, the remaining code are not executing? and...
But I am writing all the codings under OK button. But it is closing automatically when I click and opening the Calender form.
Private Sub CmdClose_Click()
Application.Quit acExit
End Sub
My form name=Login Form&Calender; Coding is in Form_Login form&Form_Calender.
I want to display the records entered by the user only. So I don't know how to get the username from login form to the calender form.
cboStaffName is the variable name in calender, where I want to retrieve the...
Ok Sure. I am creating login details for my database. I want to display the records entered by the user only. My login form is under the name "Form_Login form" and the main form name is Form_Calender. So I dont know how to get the username from login form to the calender form.
cboStaffName =...
If the user name matches, i want to filter records based on the user name and display them.
So I want to pass the username to another form.
Thanks...:)