So what do u suggest I do now?
So what do u suggest I do now?
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
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
I also modified the code in the Form_Load event to say "Hello BENJAMIN" just like your message box. Change it back if you wishCode:Private Sub txt_username_AfterUpdate() strUserName = Me.txt_username End Sub
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
anyways, let me check the file to see t6he new changes you made.
It does! Have you looked at it?
Am yet to check it.
Will get back to you sooner
You are a genius @isladogs😊
It worked perfectly
Great work
And thank you so much for your assistance.
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
@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.
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 👍🏽👍🏽
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.
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