I am trying to make Login Form Using DCount and LookUp functions
My table has the following field LoginID, UserName, Password, Level and Description
Form has:
Combobox Named: "txtUser" bound column is 1 (LoginID) and I hide it by sitting Column Widths by 0
TextBox Named "txtPass"
Login Button and I use If function with AND but it does not work, access alway open the main form to me he did not use "else"
- I want to say If txtUser and txtPass Mach then, show me message said Successfully, Close Login Form, Open the Main Form, else show me message said Failed, but access does not match "AND" he always open the Main form even If I put wrong password
If
I did this DCount("LoginID","LoginT","UserName=[txtUser]" And "Password=[txtPass]")
I did this DCount("LoginID","LoginT","UserNamer=[txtPass]") And ("Password","LoginT","Password=[txtPass]")
I did this DCount("LoginID","LoginT","UserNamer=[txtPass]" And "Password","LoginT","Password=[txtPass]")
I did this DCount("Password","LoginT","Password=[txtPass]")
they did not work
- How can I add Level deal with Levels by LookUp?
if the txtUser and txtPass Mach and his Level is 1 as admin open the Main form as edit, else as Read only


