I am writing this piece of code to show the previous record on a
control on the form but i keep getting the error message "Error 3021
no current record " and the line marked *** gets highlighted. I know
its something to do with a blank or null record as the code works fine
when i enter all details in the first record. If i omit data form the
fields relating to the second loop i get the error.
Can anyone please help????
Do
If rst!Diastolic <> rst.BOF Or rst!Diastolic <> rst.EOF Then
dias = rst!Diastolic
sys = rst!Systolic
PrevDate = rst!DATE
Else: rst.MovePrevious
End If
Loop Until dias <> ""
rst.MoveLast
Do
*** If rst!AmbSystolic <> rst.BOF Or rst!AmbSystolic <> rst.EOF
Then***
ambSys = rst!AmbSystolic
ambDias = rst!AmbDiastolic
AmbPrevDate = rst!DATE
Else: rst.MovePrevious
End If
Loop Until ambDias <> ""
rst.MoveLast