have combo box result choose action/validation

  • Thread starter Thread starter Pam
  • Start date Start date
P

Pam

I am new to visual basic and trying to make a form that will eventually
(maybe?) dump into an access database.
I have a "customer" form and when the user selects the payment type it
brings up different forms for validation.
for instance, when they select "visa" it brings up another form "visa" and
the form validates that they are inputting 16 digits.
My question is twofold.
1-How can I call the results entered into the "visa" form back to textboxes
on the "customer" form. or
2-How can I perform the validation on the "customer" form without calling
the other forms?
below is the code I have from my customer and visa forms, I have searched
but haven't found a working answer for Visual Basic 2008.
Thank you for any help you can give me.
***customer***
Private Sub ComboBox3_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles ComboBox3.SelectedIndexChanged
If ComboBox3.Text = "Visa" Then
Visa.Show()
ElseIf ComboBox3.Text = "MasterCard" Then
MasterCard.Show()
ElseIf ComboBox3.Text = "Discover" Then
Discover.Show()
ComboBox3.Text = ""
ElseIf ComboBox3.Text = "Check By Phone" Then
CheckByPhone.Show()
ElseIf ComboBox3.Text = "American Express" Then
AmericanExpress.Show()
ElseIf ComboBox3.Text = "Other" Then
Other.Show()
End If
End Sub
***visa***
Public Class Visa
'To validate that credit card number is 16 digits
Private Sub Visa_No_Validating(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles Visa_No.Validating
'Private Sub Visa_No_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Visa_No.TextChanged
If Len(Me.Visa_No.Text) < 16 Then
MsgBox("Credit Card Number must be 16 digits!")
ElseIf Len(Me.Visa_No.Text) > 16 Then
MsgBox("Credit Card Number must be 16 digits!")
End If
End Sub
End Class
 
I beleive I posted in the wrong place again, moving my post to
microsoft.public.dotnet.languages.vb
Sorry
 
Back
Top