Hello All,
Please help me.
I have a form where a user enter an ID and some details. This is saved in Table A.
The ID is also in Table B - What I want is, once the user saves it in Table A-I want it to be deleted from Table B. Ultimately, Table A has all information and Table B will only have those IDs that haven't been entered in Table A.
Basically what is entered in Table A shouldn't be there in Table B.
Is there a way to do this using a macro?
I did find a VBA code online - what is wrong here? I am not very familiar with VBA . This code also suppreses the warnings.
Private Sub Submit_Enter()
DoCmd.RunSQL "DELETE * FROM TBL_ClaimsToBeAssigned"
where [Claim ID] = Forms![FRM_PendsAssign]![Claim ID]
DoCmd.SetWarnings False
DoCmd.RunSQL "DELETE * FROM TBL_ClaimsToBeAssigned"
DoCmd.SetWarnings True
End Sub
Kindly help me. Thank you for your time and help.