var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Embed Message Box with password in button
I have a button on my main menu that open a query. I want that button when 'on click' for the message box to pop up and the user has to enter a password that I have set up in a table.
What is the best way to do that?
I know there are a couple of steps - like creating the message box? or would InputBox work for this?
Only an intermediate developer with access - so I know all you experts will have the right solution for me
Thanks so much
Yes, you'd want InputBox rather than a message box. Generally:
If InputBox("Blah") = "ActualPassword" Then
You could use a DLookup() or recordset to get the password from the table instead of hard-coding it like that. Rather than InputBox I tend to use a form:
Thanks for replying. I am afraid I am less capable of getting this up than you may think....
I tried to understand the whole wrapped form explanation but on that site - I understand the concept of an inputbox - just never created one.
Tried doing some google searches, but didn't find much.
Well, hate to bother you too much....unless you would like to walk me through some further details?
Originally Posted by pbaldy
Sorry Lynn, didn't get an email notification of your reply. Not sure what you need help with, as I gave you the basic code. To carry it further:
If InputBox("Enter password") = DLookup("PasswordField", "PasswordTable") Then
'run your process
MsgBox "Wrong password!"