Page 3 of 4 FirstFirst 1234 LastLast
Results 31 to 45 of 48
  1. #31
    Emmanuel is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2020
    Posts
    272

    So what do u suggest I do now?

  2. #32
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,974
    Follow the instructions in that thread and ....
    Quote Originally Posted by Micron View Post
    ....copy, compact, zip and post a db that contains just enough to replicate what you want if you're still stuck.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  3. #33
    Emmanuel is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2020
    Posts
    272
    This is the file. Have finally been able to upload. This is just an extract of the whole database so you can easily see what you looking for
    Attached Files Attached Files

  4. #34
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,974
    A user name /password combination would have been helpful!

    You also forgot to compact it before zipping - I reduced it from 8 MB to 1 MB

    Anyway it works now...
    I added code to save the username in frm_Login so it can be recalled later - that was mentioned more than once earlier in the thread

    Code:
    Private Sub txt_username_AfterUpdate() 
       strUserName = Me.txt_username 
    End Sub
    I also modified the code in the Form_Load event to say "Hello BENJAMIN" just like your message box. Change it back if you wish
    Do you really need both message box & the textbox in the form?

    BTW you could also have used the recordset code you had already got to get the first name for the message box. However, you never mentioned that!

    Finally I added Option Explicit to both code modules. You should always to do to ensure all variables are declared
    Attached Files Attached Files
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  5. #35
    Emmanuel is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2020
    Posts
    272

  6. #36
    Emmanuel is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2020
    Posts
    272
    anyways, let me check the file to see t6he new changes you made.

  7. #37
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,974
    It does! Have you looked at it?
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  8. #38
    Emmanuel is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2020
    Posts
    272
    Am yet to check it.
    Will get back to you sooner

  9. #39
    Emmanuel is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2020
    Posts
    272
    You are a genius @isladogs😊
    It worked perfectly
    Great work
    And thank you so much for your assistance.

  10. #40
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,974
    You're welcome. Thanks are also due to others who assisted including Micron and Gicu.
    Now you have a working copy, I suggest you go back through this thread and read the various items suggested earlier and see how these have been implemented in the database
    Good luck with the rest of your project
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  11. #41
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    @Isladogs, code doesn't compile. There is a global and module level variable with the same name (strUserName). In the meantime, I'm going to keep playing.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  12. #42
    Emmanuel is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2020
    Posts
    272
    Micron and Gicu.

    Your ideas also played a greater part in finding a solution to this.

    Thanks to you two.

    You’ve done great jobs 👍🏽👍🏽

  13. #43
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    You're welcome. One thing you should consider doing is making the username field unique, otherwise you can end up with more than 1 possibility when validating. However, I think your approach would require that both username and password are the same. Not likely perhaps, but not impossible either. It's typical that an app cannot have two or more username values but it would be OK if there were 2 or more passwords. Just want to let you know that if this is how your working db is designed, you have employed the most rudimentary protection so maybe don't count on protecting any valuable information.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  14. #44
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,974
    Quote Originally Posted by Micron View Post
    @Isladogs, code doesn't compile. There is a global and module level variable with the same name (strUserName). In the meantime, I'm going to keep playing.
    I disagree. I checked it compiled before uploading and have rechecked now
    The only place strUserName is declared is in the module. It is used in frnLogin. The project does compile.

    However I did overlook that one of the form modules didn't have the lines Option Compare Database and Option Explicit at the top. You need to add both of those
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  15. #45
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    You can disagree all you want, doesn't mean either of us are wrong.
    Click image for larger version. 

Name:	aUserName.jpg 
Views:	18 
Size:	25.2 KB 
ID:	45198
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Page 3 of 4 FirstFirst 1234 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 13
    Last Post: 10-02-2014, 09:29 AM
  2. Replies: 3
    Last Post: 03-17-2014, 10:23 AM
  3. Replies: 6
    Last Post: 02-21-2013, 10:52 AM
  4. Username and passwod login using Form
    By Tom1 in forum Programming
    Replies: 4
    Last Post: 07-04-2012, 12:29 PM
  5. Replies: 3
    Last Post: 05-31-2012, 02:49 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums