I thought I had a good idea going with my very limited knowledge, but it didn't work! Let me see if I can explain this...
My database has 2 forms.
Users complete frmPermit with an employees driving test information, and click the "Send to Control" button to email the results to a controller.
Users fill out frmTraining with training course information that an employee has completed, and click the "Send to Control" button to email these results to the controller.
The Send button on frmPermit goes to Public Sub MailPermit() that just says Dim Mail as String & Mail = "Permit", then onto another public sub called "EMail()"
The Send button on frmTraining goes to Public Sub MailTraining() that just says Dim Mail as String & Mail = "Training", then onto the "EMail()" sub.
The EMail() Public Sub sets up the email with a few IF statements to change some of the wording, depending on if Mail = Permit or Mail = Training. The problem is, the value of Mail isn't remembered from either first sub into the EMail sub.
I'm hoping to have the email stuff in only one place so if something like "mail recipients" needs to be changed, it only needs to be done in one place instead of having a piece of code for each form. The email part was set up previously with the Permit form only, and worked great, so I know the text is correct without the IF statements. How can the value of Mail be remembered between subs?
Also tried declaring Mail as Variant in each module, same results, a blank email.
Thank you for your help. Everyone here thinks I know what I'm doing, but I owe it all to you!