No Current Record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello.. I have a form with a subform for editing records in two tables (the tables have cascading relationships to delete). On this form I have a command button to delete records. When I delete a record, I get an Access message box indicating "No Current Record". I have not been able to figure out why.. any ideas? Thanks
 
----- Ed wrote: ----

Hello.. I have a form with a subform for editing records in two tables (the tables have cascading relationships to delete). On this form I have a command button to delete records. When I delete a record, I get an Access message box indicating "No Current Record". I have not been able to figure out why.. any ideas? Thank

Also, I failed to mention: The record deletes properly and the previous record then displays correctly... It is the message box that is at issue.
 
If this is happening on Access 2002 with Service Pack 3 applied, just code
to ignore the error.

It is a known bug introduced by SP3.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Ed said:
----- Ed wrote: -----

Hello.. I have a form with a subform for editing records in two
tables (the tables have cascading relationships to delete). On this form I
have a command button to delete records. When I delete a record, I get an
Access message box indicating "No Current Record". I have not been able to
figure out why.. any ideas? Thanks
Also, I failed to mention: The record deletes properly and the previous
record then displays correctly... It is the message box that is at issue.
 
Private Sub cmdDelete_Click()
On Error GoTo Err_cmdDelete_Click

RunCommand acCmdDeleteRecord

Exit_cmdDelete_Click:
Exit Sub

Err_cmdDelete_Click:
If Err.Number <> 3021 Then
MsgBox "Error " & Err.Number & " - " & Err.Description
End If
Resume Exit_cmdDelete_Click
End Sub


For an explanation of error handling routines, see:
http://allenbrowne.com/ser-23a.html
 
Back
Top