I wrote the following code for deleting tables:
Function rib()
On Error GoTo Err_Command4_Click
DoCmd.DeleteObject acTable, "REGISTER I M F"
DoCmd.DeleteObject acTable, "DEPARTMENT & ALLOCATION"
DoCmd.DeleteObject acTable, "CASH OFFICE"
Exit_Command4_Click:
Exit Function
Err_Command4_Click:
MsgBox Err.Description
Resume Exit_Command4_Click
End Function
But it failed because the tables are connected in relationship. How to delete reationship through code?
Function rib()
On Error GoTo Err_Command4_Click
DoCmd.DeleteObject acTable, "REGISTER I M F"
DoCmd.DeleteObject acTable, "DEPARTMENT & ALLOCATION"
DoCmd.DeleteObject acTable, "CASH OFFICE"
Exit_Command4_Click:
Exit Function
Err_Command4_Click:
MsgBox Err.Description
Resume Exit_Command4_Click
End Function
But it failed because the tables are connected in relationship. How to delete reationship through code?