Joe, this is not a single question (as it should be to post a question thread), however I will attempt to point you in the right direction. From there I suggest if you are unsure on any specific question then you need to post a thread about that
particular question. Handling multiple subjects in the same thread is bad for you, bad for the experts, bad for the site, and bad for everyone who wants to use the site. It benefits no-one.
Joe Y:
The first help I need is to know the VBA function that will make Access to pop up message when record is added or deleted.
These are separate operations and need to be handled separately, but for each the trick is to find the appropriate event and write an event procedure for it. The
Before events always supply a parameter called
Cancel which you can set to
True if you want to cancel the event.
- Adding Records :
Records are added twice. Sounds strange, and technically it's not true, but it may help to think that way (and it's surprising so gets your attention).
First, when the record buffer is dirtied (data is actually changed) in the new record then the Insert related events (Form_BeforeInsert & Form_AfterInsert) trigger. Next, if and when the new record is actually saved, then the Update related events (Form_BeforeUpdate & Form_AfterUpdate) trigger. These events trigger for all saves, but the .NewRecord property will be True when a new record is added. - Deleting Records :
For this there are DelConfirm events (Form_BeforeDelConfirm & Form_AfterDelConfirm). The Before version also supplies a Response parameter for you that enables you to prompt the user automatically.
For help on any of these event procedures use
Context-Sensitive Help on the name after the
Form_ part and click on the event link of the same name.
EG. type in your Immediate Pane or somewhere in your code :
beforedelconfirm
then press F1. Next click on the link reading :
Returns or sets a String indicating which macro, event procedure, or user-defined function runs when the BeforeDelConfirm event occurs. Read/write.
This should give you all the details you need.
When you have looked into this a bit more then you will have everything you need, but you can post more questions if you still need to. I have given answers previously on how to handle things in sub-forms. Again, if you need further help then ask a new, specific, question making clear exactly where you are stuck.