For me, I am driven by two main philosophies: know more today about the world than I knew yesterday and lessen the suffering of others. You'd be surprised how far that gets you.
Richard... sorry, I'm confused - again :-) This is the code I wrote: Private Sub btnInvoices_Click() Dim MyPassword As String MyPassword = InputBox("Enter Password", "Password") If MyPassword = "mypassword" Then DoCmd.OpenForm "frmInvoices" Else MsgBox "Your request has been canceled or you have entered an invalid password. Please try again or contact your System Administrator.", vbCritical, "Sorry..." Exit Sub End If End Sub
On other fields there would be an INPUT MASK option under the Data tab of the Property Sheet, but buttons don't have this option. Is there a set of code I could use instead?
Reply from Richard Rost:
Sorry, I didn't catch that you're using an actual InputBox function for this. No, there's no way to mask the input in this case. What I have done in the past is to create my own little logon form with a single text box (password) and an OK button. Make it popup and modal, and have the OK button check for the password.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Microsoft Access 306.