Share via

Login Form

Anonymous
2021-10-02T00:50:05+00:00

Initially I created a login Form using macro in Microsoft Access but decided to use vba code instead.

I deleted the macro form but now after creating a new login Form,it autofills the login details with an old username.

This prompts an alert that the user is not authorized to log in.

Even after I clear it and key in valid credentials I can't log in.

How do I remove this autofill?

Kindly assist as I have tried everything in vain.

Microsoft 365 and Office | Access | For business | 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

6 answers

Sort by: Most helpful
  1. DBG 11,711 Reputation points Volunteer Moderator
    2021-10-02T14:08:50+00:00

    Thanks a lot for your quick response.Yes I created the other login Form from scratch.

    During the creation of the first form,at one time there was a related query that I had created that popped up as I saved.Being a learner I went ahead with it.

    I have attached the screenshots of the code and the password auto fill.I appreciate any assistance accorded.And thanks for your help.ImageImage

    If that's all the code you have on that form, you won't be able to log in, unless you update the user table with the "old" username, because that code only fires once - when the form opens.

    If you want the user to type in their username to log in, you can either use the AfterUpdate event of the Textbox or provide a button to log in. Also, if you don't want to autofill the username, then delete the line:

    Me.txtUser=Environ("Username")

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2021-10-02T08:58:13+00:00

    Thanks will take a look

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2021-10-02T08:31:36+00:00

    Sometimes it's not worth reinventing the world. There are a great many freely available demo of login form. Dave yourself time and frustrations and use I've of them as a starting point that you can tweak for your exact needs.. so take a look at

    https://www.devhut.net/2012/12/21/ms-access-login-form/

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2021-10-02T06:46:00+00:00

    Thanks a lot for your quick response.Yes I created the other login Form from scratch.

    During the creation of the first form,at one time there was a related query that I had created that popped up as I saved.Being a learner I went ahead with it.

    I have attached the screenshots of the code and the password auto fill.I appreciate any assistance accorded.And thanks for your help.

    Was this answer helpful?

    0 comments No comments
  5. DBG 11,711 Reputation points Volunteer Moderator
    2021-10-02T01:02:27+00:00

    Did you create a new form from scratch? We'll need to know exactly what you did to be able to say what may be wrong with it.

    Was this answer helpful?

    0 comments No comments