|
-
Dec 31st, 2002, 12:08 PM
#1
Thread Starter
Fanatic Member
Reference TextBox from Functions
I need to be able to referecne ofjects from my forms in my functions.
This is my Function
Function fncLogin(ByRef Sender As Object, ByVal e As System.EventArgs)
Dim EmployeeName As Login
EmployeeName = CType(Sender, Login)
If EmployeeName.TextBox1.Text = "" Then
MsgBox("You must enter a username!", vbExclamation)
EmployeeName.TextBox2.Focus()
Exit Function
End If
If EmployeeName.TextBox2.Text = "" Then
MsgBox("You must enter a password!", vbExclamation)
EmployeeName.TextBox2.Focus()
Exit Function
End If
End Function
When I try to call this function with this.
fncLogin()
It is underlined.
What am I doing wrong?
Thanks!
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
|