UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

> Input mask on inputbox    
 
   
luvfuzz
post Jul 31 2006, 10:53 AM
Post #1

UtterAccess Veteran
Posts: 461
From: Indiana



Is there a way to add the password input mask (******) to an input box?

I know that I could just create a custom form...just thought I'd see if anybody knew if this is possible.
Go to the top of the page
 
+
 
Start new topic
Replies (1 - 5)
freakazeud
post Jul 31 2006, 11:05 AM
Post #2

UtterAccess VIP
Posts: 31,413
From: NC, USA



Hi,
yes there is...check this sample!
But creating a custom form is much easier and looks nicer.
HTH
Good luck
Go to the top of the page
 
+
luvfuzz
post Jul 31 2006, 11:17 AM
Post #3

UtterAccess Veteran
Posts: 461
From: Indiana



I was sort of expecting that. Thanks for the information. Custom forms all around!
Go to the top of the page
 
+
freakazeud
post Jul 31 2006, 11:20 AM
Post #4

UtterAccess VIP
Posts: 31,413
From: NC, USA



You're welcome.
Good luck on future projects!
Go to the top of the page
 
+
wwwhitaker
post Aug 9 2006, 02:18 PM
Post #5

New Member
Posts: 2



Do you have an easy solution for access 97??? I'm stuck supporting & making mods to an old system. The problem I have is during a sub routine, a inputbox was used to get the user password. Problem is that it shows text typed. I tried to open a custom form, but not sure how to stop the code and wait for the user to enter the password, click enter. I planed to hide the form once enter is clicked and then refer to the data on the hidden form, but the code continues from the DoCmd.OpenForm and is already looking for the data from the form which just opened. Any ideas how to modify this without total rewrite?

OLD CODE IS:

Private Sub TSFA_Click()
Dim PassW As String
Dim user As String
Dim db As Database
Dim rec As Recordset
Dim counter
Dim x As Integer


Process_Final_Approval.SetFocus
PassW = InputBox("Please enter your Password.")

'setting variables
Set db = CurrentDb()
Set rec = db.OpenRecordset("People")
rec.MoveLast
rec.MoveFirst
counter = rec.RecordCount
x = 0

'matching password to employee name
Do Until x = counter
If rec("Password") = PassW Then
user = rec("Name")
Technical_Final_Approval.SetFocus
rec.Edit
Technical_Final_Approval = user
rec.Update
Exit Sub
End If
x = x + 1
rec.MoveNext
Loop

'what happens if password is not valid
MsgBox " Your Password was not recognized." & vbCr & vbCr & " Access Denied!", , "Invalid Password"
TSFA.SetFocus
TSFA.Value = 0

End Sub
Go to the top of the page
 
+
freakazeud
post Aug 9 2006, 02:38 PM
Post #6

UtterAccess VIP
Posts: 31,413
From: NC, USA



Hi,
why not just split up the code?
Open your form with:

DoCmd.OpenForm "YourPasswordForm"

Then on the on click event of a button on this form use:

Dim PassW As String
Dim user As String
Dim db As Database
Dim rec As Recordset
Dim counter
Dim x As Integer

Me.Visible = False
PassW = Me.YourPasswordControl

'setting variables
Set db = CurrentDb()
Set rec = db.OpenRecordset("People")
rec.MoveLast
rec.MoveFirst
counter = rec.RecordCount
x = 0

'matching password to employee name
Do Until x = counter
If rec("Password") = PassW Then
user = rec("Name")
Technical_Final_Approval.SetFocus
rec.Edit
Technical_Final_Approval = user
rec.Update
Exit Sub
End If
x = x + 1
rec.MoveNext
Loop

'what happens if password is not valid
MsgBox " Your Password was not recognized." & vbCr & vbCr & " Access Denied!", , "Invalid Password"

HTH
Good luck
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 23rd May 2013 - 04:18 PM