J
Jennifer Robertson
I have a form for processing of permits. On this form is a subform for
audits.
I have the subform based on a query of the audits and sorted by date.
When the subform is loaded, it moves to the last audit for that permit
holder, thus displaying the most recent audit.
That all works fine.
There are cases where the permit is new and the permit holder has not been
audited yet. The subform is blank, which is good. However if I close the
form while viewing a permit which has no recordset for audits, I get the "no
current record" error message box. If I close the form while viewing a
permit which has a recordset for audits, I do not get the message.
The code is:
Private Sub Form_Current()
On Error Resume Next
If Me.Recordset.BOF <> Me.Recordset.EOF Then
Me.Recordset.MoveLast
End If
End Sub
How do I suppress this?
audits.
I have the subform based on a query of the audits and sorted by date.
When the subform is loaded, it moves to the last audit for that permit
holder, thus displaying the most recent audit.
That all works fine.
There are cases where the permit is new and the permit holder has not been
audited yet. The subform is blank, which is good. However if I close the
form while viewing a permit which has no recordset for audits, I get the "no
current record" error message box. If I close the form while viewing a
permit which has a recordset for audits, I do not get the message.
The code is:
Private Sub Form_Current()
On Error Resume Next
If Me.Recordset.BOF <> Me.Recordset.EOF Then
Me.Recordset.MoveLast
End If
End Sub
How do I suppress this?