Upload
agrippah-mungazi
View
213
Download
0
Embed Size (px)
DESCRIPTION
search record vb6.0
Citation preview
Private Sub Command1_Click()'to search for a recordDim PatientID, i As Integer PatientID = InputBox("Enter the PatientIDNumber of the person you want to search for!") Me.AdoPatients.Recordset.MoveFirst While (PatientID txtPatientID.Text And i 1) Me.AdoPatients.Recordset.MoveNext If Me.AdoPatients.Recordset.EOF = True Then i = 1 Wend If Me.AdoPatients.Recordset.EOF = True Then MsgBox ("Record not found!"), vbInformation + vbOKOnly Me.AdoPatients.Recordset.MoveLast Unload Me frmPatients.Show vbModal End If
End Sub