Hello,
You seem to be presenting two questions here. The main question deals with totaling four fields in a form and the second question is about locking up the database. This should really be two different questions on the forum.
As for the second, to help there, more info would be necessary like what was in the macro, can you run in Safe Mode
(found in Help
menu item), does it only freeze when the macro is run and possibly more.
For your main question, you should avoid macros wherever possible. To get a total you only need to use a sub form and some SQL (query). Now the total will only be available once the record is added to the table but in 99% of the cases this is all that is needed. For some examples of this, see sample files in my answers on these posts:
Adding 6 Fields for Total but some fields will have no Data to Add
Base - calculations from calculated field
Refresh table control
Now, if you absolutely must see the total as the data is being entered, macro code is necessary. As you have probably noticed, this is not typically easy. What code is needed is specific to the form and conditions. Here is a link containing a sample of calculating fields as data is entered:
Base Form data uneditable
I'm just guessing, if your looking at "My macros &...... Basic, window, just exit out. Or if in your macro's, delete the one wanting you to fix it, or all if not needed.