D
Dale
I am numbering fields in one table by comparing to its relational one to
many table's primary key. The two fields used in the comparison are text,
on the last record of the comparison if I use "=" rather than "<>" in the
second part of the loop I get the runtime error "3021 no current record".
In my test environment I cannot reproduce the error, only in the production
environment. All is well if I use the "<>" comparator in both test and
production environments....can anyone explain to me the significance of "<>"
over the "="?
Thanks...
Do While Not rstPatients.EOF
lngCount = 1
Do While rstPatients!Patsys <> rstEncounters!Patsys
With rstEncounters
.Edit
!encnum = lngCount
.Update
.MoveNext
lngCount = lngCount + 1
Debug.Print lngCount
End With
Loop
rstPatients.MoveNext
Loop
ErrExit:
rstEncounters.Close
rstPatients.Close
Set dbs = Nothing
strEnd = Now()
MsgBox "Operation completed: " & Format(DateDiff("n", strStart, strEnd),
"###0.0000") & " mins"
many table's primary key. The two fields used in the comparison are text,
on the last record of the comparison if I use "=" rather than "<>" in the
second part of the loop I get the runtime error "3021 no current record".
In my test environment I cannot reproduce the error, only in the production
environment. All is well if I use the "<>" comparator in both test and
production environments....can anyone explain to me the significance of "<>"
over the "="?
Thanks...
Do While Not rstPatients.EOF
lngCount = 1
Do While rstPatients!Patsys <> rstEncounters!Patsys
With rstEncounters
.Edit
!encnum = lngCount
.Update
.MoveNext
lngCount = lngCount + 1
Debug.Print lngCount
End With
Loop
rstPatients.MoveNext
Loop
ErrExit:
rstEncounters.Close
rstPatients.Close
Set dbs = Nothing
strEnd = Now()
MsgBox "Operation completed: " & Format(DateDiff("n", strStart, strEnd),
"###0.0000") & " mins"