Upload
agrippah-mungazi
View
217
Download
1
Embed Size (px)
DESCRIPTION
VB 6.0 programming
Citation preview
Private Sub cmdSave_Click()'to save ammendments made in record
If MsgBox("Are you sure you want to save this record?", vbQuestion + vbYesNo) = vbYes Then If txtPatientID.Text = "" Or txtPName.Text = Empty Or txtPSurname.Text = Empty Or txtDateOfBirth.Text = Empty Or txtAdmissionDate.Text = Empty Then MsgBox (" A record cannot contain a blank field! Please check"), vbCritical + vbInformation + vbOKOnly If txtPatientID.Text = "" Then txtPatientID.SetFocus ElseIf txtPName.Text = "" Then txtPName.SetFocus End If Else If Len(txtPatientID.Text) = 4 And (txtPatientID >= "P001" And txtPatientID