Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

no current record error on subform 1

Status
Not open for further replies.

NewTexican

Technical User
Dec 10, 2004
95
US
I have a delete command button on the parent form. Nothing special just regular old delete made with the wizard. I have a subform that links to the parent form, nothing special once again built with the wizard. The subform is based on a query.

When the user deletes a record cascading deletions delete what is on the subform, as it should. Then I get a message box that says "no current record." Is there any code I can insert that keeps this message box from popping up?

Thanks.
 
This is what I use to stop No Current Record message.

Code:
On Error GoTo ErrorHandler
[green]'your code here[/green]

ErrorHandler:
If Err = 3021 Then [green]'no current record[/green]
    Resume Next
   Else
   MsgBox "Error No: " & Err.Number & "; Description: " & Err.Description
   Resume ErrorHandlerExit
End If


Zameer Abdulla
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top