Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2007

    Unanswered: E-mail from addresses in table

    Hi All,

    I have a form where a user clicks send e-mail and it is coded to send an email to certain email addresses based on what is entered in the "Employer" and "Division" Text boxes on the form. However, my issue is that I currently have the e-mails written in the code, and if one changes, I need to go in the code to change it.

    I'm thinking this can be solved with a table. How would I accomplish a table that houses e-mails that can be used instead of writing them in the code as I have below. Below is an example of my current code.

    ElseIf Me.Region = "NORTHERN" And Me.Employer = "ABC" Then

    DoCmd.SendObject acQuery, "Employer Email ", "Excel97-Excel2003Workbook(*.xls)", ";;

  2. #2
    Join Date
    Jan 2003
    If this is all driven off a form, you could create your table of email addresses and then create a textbox control that does the lookup based on region and employer (visible or invisible depending your preference). You would then update the SendObject command to use the control you created.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts