program assistance

robv19
10-04-2001, 01:08 PM
Here is a program that I have been working on. I am getting errors when I try to run it. The way it is supposed to run is the frmLogon screen is supposed to be displayed first then the user is prompeted to put in a user name and a password. The password is supposed to be "password". And if the user puts an invalid password in 3 or more times a message box is supposed to tell them it is invalid and after the third time end the application.
If the user puts in a correct password then the frmMain page is displayed. And it makes calculations of loan amounts based on the number of years specified and based on the interest rate specified. If anyone can help me in any way I would really appreciate it.

Thanks,
Robbie

Nemu
10-04-2001, 01:10 PM
Where do you get the error exactly??


I don't see any error in the code...

<P ID="edit"><FONT class="small"><EM>Edited by Nemu on 10/04/01 02:33 PM.</EM></FONT></P>

ChiefRedBull
10-04-2001, 01:23 PM
And what do you need help with?
Any specifi problems we can give you pointers on, but you probly wnt get just "general" help.

Chief

"How are we to learn, if those that know will not teach... ?" - Me.

anhmytran
10-04-2001, 01:24 PM
I customize the LogIn form by VB Wizard:

Option Explicit

Public LoginSucceeded As Boolean

Private Sub cmdCancel_Click()
'set the global var to false to denote a failed login
LoginSucceeded = False
Me.Hide
End Sub

Private Sub cmdOK_Click()
Static AttemptCount As Integer
LoginSucceeded = False
'check for correct password
If txtPassword.Text = "Pwd" And txtUserName.Text = "UID" Then
LoginSucceeded = True
Me.Hide
Else
If AttemptCount < 2 Then
AttemptCount = AttemptCount + 1
MsgBox "Invalid Password, try again!", , "Login"
txtPassword.SetFocus
SendKeys "{Home}+{End}"
Else
MsgBox "3 times already", vbOKOnly, "Application Terminated"
End
End If
End If
If LoginSucceeded Then Form1.Show
End Sub
</p>

AnhMy_Tran

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum