Hello, I have created a login form so that users have to log in before accessing anything. I tried to make the 'submit' button for the login form verify if all information that has been entered is correct before loading the Menu form. All of this works, however, I do not know how to make the Login form close once the Menu form has been loaded. I have tried the following in a macro:
If DCount("ID";"tblUsers";"[Forms]![Login]![txtUsername]=Username and [Forms]![Login]![txtPassword]=Password")<>0 Then
Open Form
Form name: Menu
Close Window
Object type: Form
Object Name: Login
Save: Prompt
(I am sorry if the explanation is not clear)
However, if I click the 'submit' button then I just get an error message (the Menu is not opened and neither is the Login form closed). I would really apreaciate if someone could identify what it is that I am doing wrong (I do not know how to use VBA so if you can please suggest an alternative that does not involve VBA-sorry).
Thank you!