R
Rick Brandt
Try...
Do While Not .NoMatch
....instead of...
Do While Not .EOF
Do While Not .NoMatch
....instead of...
Do While Not .EOF
SELECT tblPatient.ChartNo, tblAdmission.* _
FROM tblPatient _
INNER JOIN tblAdmission _
ON tblPatient.ID = tblAdmission.PatientID"
Set rstObject = dbObject.OpenRecordset(strSQL)
With rstObject
.FindFirst "ICD9='650'"
Do While Not .EOF
strChartNo = strChartNo & " " & !ChartNo
.FindNext "ICD9='650'"
Actually this is part of my codes of a
calculation Sub. I am not going to Update my database with this
code.
I am
afraid people will not understand me if I didn't make it simpler
or integral when I posted.
What I want to do is to check through the records first to see if
they are all fit to be calculated. If some of them are not, Access
will pop up a message showing the number of these records.
I didn't know that I can't close the database in such instance.
I'll fix it as you suggest. Thank you very much.
I am not sure if this is a formal way to write an Access program,
but it works. I am appreciated to know any other ways to do this.