Search Record Vb6.0

Published on January 2017 | Categories: Documents | Downloads: 29 | Comments: 0 | Views: 107
of 1
Download PDF   Embed   Report

Comments

Content

Private Sub Command1_Click()
'to search for a record
Dim 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

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close