is there a code or away to delete a record from a subform with a button on a form if so how would that be done
lee123
Lee,
The basic delete code is shown below, You can add message boxes and confirmations as needed. Be sure you replace the illustrative object names I used with the actual object names from your application.
Code:
Private Sub btnDelete_Click()
Dim strSQL As String
strSQL = "Delete * from YourTable where YourField = " & Me.YourSubformControl.Form.textbox & ";"
CurrentDb.Execute strSQL, dbFailOnError
End Sub
Comment