No Current Record Error trap.

  • Thread starter Thread starter Jim Shortslef
  • Start date Start date
J

Jim Shortslef

How would I write an error trap to avoid a "No Current
Record" error for the rst4.MoveFirst line of code below?
When this error occurs I would like to jump to below the
End if code.

Set dbs4 = CurrentDb()
Set rst4 = dbs4.OpenRecordset("qry_LocCheck")
rst4.MoveFirst
If rst4.Fields(CTrt).Value > 0 Then ......

End If
 
After setting the recordset, try
If Not (rst4.BOF and rst4.EOF) Then
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top