In VB6 I could pass a form to a function so that if i had similar forms with some of the controls named the same, the function could acess them.
When I try to do this is VS 2008 get an error, "'txtSocialSecurity' is not a member of 'System.Windows.Forms.Form'."
Is there some way to do this?
Thanks!
When I try to do this is VS 2008 get an error, "'txtSocialSecurity' is not a member of 'System.Windows.Forms.Form'."
Is there some way to do this?
Code:
If not ValidateClient(Me) then ...
Function ValidateClient(ByRef targetForm As System.Windows.Forms.Form) As Boolean
If targetForm.txtSocialSecurity.text = "" Or Len(targetForm.txtSocialSecurity.text) <> 9 Then
ValidateClient = False
End If
End Function