Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21842

Empty TextBox trapping Problem

$
0
0
Private Sub cmdSave_Click()
Select Case TextBox
Case "a"
If txtMAdd.Text = "" Then
MsgBox "No ADDRESS detected...try to fill all fields before saving.!.!.!.", vbExclamation, "Mechanic Manager Message..."
Label5.Visible = True
txtMAdd.SetFocus
Exit Sub
ElseIf txtMAdd.Text <> "" Then
Label1.Visible = False
End If
Case "b"
If cboAge.Text = " •••••> SelectAge <•••••" Then
MsgBox "Unble to Save Default Label Field", vbExclamation, "Mechanic Manager Message..."
Label4.Visible = True
cboAge.SetFocus
Exit Sub
ElseIf cboAge.Text <> "" Then
Label4.Visible = False
End If
Case "c"
If txtExpertise.Text = "" Then
MsgBox "No EXPERTISE detected...try to fill all fields before saving.!.!.!.", vbExclamation, "Mechanic Manager Message..."
Label3.Visible = True
txtExpertise.SetFocus
Exit Sub
ElseIf txtExpertise.Text <> "" Then
Label3.Visible = False
End If
Case "d"
If txtLN.Text = "" Then
MsgBox "No LAST NAME detected...try to fill all fields before saving.!.!.!.", vbExclamation, "Mechanic Manager Message..."
Label2.Visible = True
txtLN.SetFocus
Exit Sub
ElseIf txtLN.Text <> "" Then
Label2.Visible = False
End If
Case "e"
If txtFN.Text = "" Then
MsgBox "No FIRST NAME detected...try to fill all fields before saving.!.!.!.", vbExclamation, "Mechanic Manager Message..."
Label1.Visible = True
txtFN.SetFocus
Exit Sub
ElseIf txtFN.Text <> "" Then
Label1.Visible = False
End If
End Select





my select case control is really messy up there....:afrog:
Attachment 95987
Attached Images
 

Viewing all articles
Browse latest Browse all 21842

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>