KellyGroom
Registered User.
- Local time
- Today, 05:03
- Joined
- Sep 6, 2007
- Messages
- 16
HelloI have a database that has a table that contains addresses which can be associated with various individuals, i.e. 1 address can be shared by many individuals. I have created a form that provides a user with a function to delete addresses that are no longer used. However, as expected when a user tries to delete an address that is still associated to a user, the standard message below appears.I would like to amend the standard message to make it more user friendly so that the user understands what it means and if possible to also remove the option of being able to delete the record until any associations have been removed first?I have managed to create a message however, it appears after this standard message. I have jotted below my VB on click script but would be very grateful if somebody could advise me how to prevent the standard message from appearing so that the user only receives my intended message. Private Sub delete_Click()On Error GoTo Err_delete_Click DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70 DoCmd.Close DoCmd.CloseExit_delete_Click: Exit SubErr_delete_Click: MsgBox "This address cannot be deleted as it has people associated with it. You must first select another address for the individual before you can return to this menu and delete the address." Resume Exit_delete_Click End SubIf anyone can help or point me in the right direction I would be very grateful.Thank you.