Ms Access Login form and User Level

Anonymous
2021-04-17T02:19:13+00:00

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"

  1. 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

  1. 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

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

17 answers

Sort by: Most helpful
  1. Anonymous
    2021-04-18T10:17:45+00:00

    Hi, Daniel Pineault

    I do understand,

    I will try to ask question that can be done by Macros.

    Thank you for your kind help

    0 comments No comments
  2. Anonymous
    2021-05-10T00:38:07+00:00

    https://www.w3schools.com/asp/

    https://www.w3school.com.cn/asp/asp\_intro.asp

    classic asp   is a dynamic web with VBScript which you can build a web application.

    iis is ready for windows system.

    if you want to public on Internet, you need rent a host like azure.

    0 comments No comments