aplelois
asked on
empty fields
hello,
I have 3 textbox in the save.vb and a button called save
I want to make sure the ppl dont leave empty fields
meaning if they only put name and last name but not
phone a windows will come and say you need to put
your phone number. how would I do that?
Public Class frmAdd
Private Sub cmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click
Dim FileNo As Short
On Error Resume Next
FileNo = FreeFile()
FileOpen(FileNo, "C:\Accounts.ini", OpenMode.Append, , OpenShare.Shared)
PrintLine(FileNo, txtFirst.Text & ";" & txtLast.Text & ";" & txtPhone.Text)
FileClose(FileNo)
frmMain.Enabled = True
frmMain.Activate()
Me.Close()
End Sub
End Class
I have 3 textbox in the save.vb and a button called save
I want to make sure the ppl dont leave empty fields
meaning if they only put name and last name but not
phone a windows will come and say you need to put
your phone number. how would I do that?
Public Class frmAdd
Private Sub cmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click
Dim FileNo As Short
On Error Resume Next
FileNo = FreeFile()
FileOpen(FileNo, "C:\Accounts.ini", OpenMode.Append, , OpenShare.Shared)
PrintLine(FileNo, txtFirst.Text & ";" & txtLast.Text & ";" & txtPhone.Text)
FileClose(FileNo)
frmMain.Enabled = True
frmMain.Activate()
Me.Close()
End Sub
End Class
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.