Have a form that the user will print after filling in some fields. On the form I have 4 buttons. 2 buttons are for opening different forms. 1 is to close the whole database. The last one is to print the form. I have the form set so that when the user opens the this particular form, it is blank and ready for the new record to be entered. In other words the navigation options are gone to scroll through previous records. All the user sees a blank form that needs to be filled out. Once the user fills out the fields and then prints the form, the record is saved into the table and the form becomes blank again for another new record to be entered.
The problem I am having now is that if the user cancels the print from the print window, the record will still be saved. Also if the user clicks on any of the other 3 buttons, whether it be to open another different form or close the database, it will also save the record into the table.
How do I prevent this from happening? I would ONLY like the record to be saved into the table IF they successfully print the form. So this I think would need to be tied to the print button but the other 3 buttons would need something to prevent the form from saving the record if any of the other buttons are clicked. I should also mention I setup the buttons with macros. I don't know anything about VBA.
Can anyone help with this?