|
-
Feb 20th, 2004, 08:54 AM
#1
Thread Starter
New Member
Input Box to Form
I have created an Inputbox PIN password function. It works great with the exception that the PIN number isn't hidden by astericks. I've seen messages saying to convert to the inputbox to a form. I've attached the coding that I use for the inputbox...could someone advise me on how to change the coding to include the form instead of the inputbox?
-
Feb 20th, 2004, 11:32 AM
#2
Fanatic Member
You seem to have missed off the attachment.
-
Feb 20th, 2004, 12:25 PM
#3
Thread Starter
New Member
Coding
OOps....Sorry bout that...
Private Sub Ctl10_1_1_Enter()
Dim strInputPin As String
If Ctl10_1_1 <> "" Then
strInputPin = InputBox("Unlock with original signer's pin:")
Dim rsCheck As ADODB.Recordset
Set rsCheck = New ADODB.Recordset
rsCheck.ActiveConnection = CurrentProject.Connection
rsCheck.CursorType = adOpenKeyset
rsCheck.LockType = adLockOptimistic
rsCheck.Open "Select * From tblTrainerSignOffs"
rsCheck.Find "[strName] = '" & Ctl10_1_1 & "'"
If rsCheck!strPin = strInputPin Then
MsgBox ("Sign-off unlocked.")
Else
MsgBox ("Pin did not match. Stop cheating.")
GoTo 998
End If
rsCheck.Close
Set rsCheck = Nothing
Else
End If
strInputPin = InputBox("Enter Sign-Off Pin:")
Dim rsUsers As ADODB.Recordset
Set rsUsers = New ADODB.Recordset
rsUsers.ActiveConnection = CurrentProject.Connection
rsUsers.CursorType = adOpenKeyset
rsUsers.LockType = adLockOptimistic
rsUsers.Open "Select * From tblTrainerSignOffs"
rsUsers.MoveFirst
Do Until rsUsers.EOF
If rsUsers!strPin = strInputPin Then
Ctl10_1_1 = rsUsers!strName
GoTo 999
Else
rsUsers.MoveNext
End If
Loop
999 rsUsers.Close
Set rsUsers = Nothing
998 [Command34].SetFocus
DoCmd.RunCommand (acCmdRefresh)
End Sub
-
Feb 20th, 2004, 12:29 PM
#4
Sleep mode
Looks VB6 code , do you have specific VB.NET question ?
-
Feb 20th, 2004, 09:54 PM
#5
Frenzied Member
-
Feb 21st, 2004, 01:10 AM
#6
-
Feb 22nd, 2004, 07:03 AM
#7
Thread Starter
New Member
Font and Goto
THe problem is that I want the box to show passchar or a different font to hide what is inputted. I was wanting to know how to do this without making a form.
And whats wrong with GOTO lines...it's been a great way of redirecting when needed?
-
Feb 22nd, 2004, 07:11 AM
#8
Sleep mode
Isn't this VB6 Code ?????
-
Feb 22nd, 2004, 07:26 AM
#9
Thread Starter
New Member
-
Feb 22nd, 2004, 07:29 AM
#10
Sleep mode
Originally posted by RobV10
Yeah...it's VB6.3
Even if it's VB6.9999999 it's still VB6 code and it's different than VB.NET . This forums is only for VB.NET Code . Did you post it in VB6 forum ?
-
Feb 23rd, 2004, 04:51 PM
#11
Fanatic Member
I think most will agree the only time the Goto statement should be used is in the line on error goto ErrorHandler. Anything other than this and you are getting into spaghetti code and any other developers attempting to look at your code would not thank you for that.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|