on delete function
Hiya
i wish to use the on delete function, so when some one clicks on a form line delete, it checks a second table to delete information from there too.
two tables are
rep one speciality and rep multi speciality.
so if it matches the same forename, surname and company from the one special, and in the multi special it will delete from both these tables.
i can use realtionships, and the tables were setup with forrign keys to autonumbers ID, and each rep was enetered in a random order, so in each table a rep from one company will have a diffrent i.d in one table to another
i have found the form on delete and its showing as this at the moment
Private Sub Form_Delete(Cancel As Integer)
End Sub
but i dont know how to code it.
i have got a delete button on the form and it looks like this...
Private Sub Command37_Click()
On Error GoTo Err_Command37_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_Command37_Click:
Exit Sub
Err_Command37_Click:
MsgBox Err.Description
Resume Exit_Command37_Click
End Sub
but i don't know what code to add
please help
joeybird
|