Trying to accomplish something here and need some input. Have a DB that produces a report which is emailed via a command button. No problem here, that works fine. The problem is I am about to split this DB and make the front end a mde file. After that, no code to easily change, and the email addresses are in the code! Code is simple like this...
Private Sub cmdEmailNotice_Click()
DoCmd.RunCommand acCmdSaveRecord
DoCmd.SendObject acReport, "rptNewJob", "SnapshotFormat(*.snp)", "Email1@mail.com,Email2@mail.com,Email3@mail.com,Email4@mail.com", "", (Me!JobDescription), "", False, ""
End Sub
Now the problem.... What if "Email3@mail.com" got fired ?? And an "Email6@mail.com" got hired. I don't really want to create a update to the front-end just to change email addresses.
I thought of adding a table of email addresses but I would need a means of inserting the list (formatted properly with commas) into the code. Like I did the "Subject line" in this code.
What it would come to is inserting field from the Email table,(fieldEmailAddress) into the code, BUT separating each record with a comma. How would I do this?
Make sense???
Thoughts????
Thanks
Curtis
Private Sub cmdEmailNotice_Click()
DoCmd.RunCommand acCmdSaveRecord
DoCmd.SendObject acReport, "rptNewJob", "SnapshotFormat(*.snp)", "Email1@mail.com,Email2@mail.com,Email3@mail.com,Email4@mail.com", "", (Me!JobDescription), "", False, ""
End Sub
Now the problem.... What if "Email3@mail.com" got fired ?? And an "Email6@mail.com" got hired. I don't really want to create a update to the front-end just to change email addresses.
I thought of adding a table of email addresses but I would need a means of inserting the list (formatted properly with commas) into the code. Like I did the "Subject line" in this code.
What it would come to is inserting field from the Email table,(fieldEmailAddress) into the code, BUT separating each record with a comma. How would I do this?
Make sense???
Thoughts????
Thanks
Curtis
Last edited: