G
Guest
Okay, I think this one might be little tough. Though I'm learning very
quickly that there's nothing too difficult for all you geniuses out there.
Here's what I'd like to do. I've got a Personel table with related contact
information and I've got a Sites table. there's a one to many relationship
between the Personel and Sites tables. Many people can be a one site. What
I'd like to do is have a form with a drop down list box that shows all of the
site names, and a button. When I click this button I want a blank email to
open up that has all of the email addresses of the individuals that are
related to that site in the To: field.
I think the code should probably look something like this but different:
***************Begginning of Code*********************
Dim objOutlook As New Outlook.Application
Dim objMail As MailItem
Set objOutlook = New Outlook.Application
Set objMail = objOutlook.CreateItem(olMailItem)
EmailAddr = Me.Email
CopyEmailAddr = ""
Subj = "Information about the FSR Update database."
Body = ""
PathName = ""
With objMail
.To = EmailAddr
.cc = CopyEmailAddr
.Subject = Subj
.Body = Body
.NoAging = True
.Display
End With
********************End of Code***********************
The EmailAddr variable will have to contain all of the email addresses of
the individuals of a certain site. I probably need a function that finds out
those email addresses that assigns them to a variable that I can call
somehow. Anyway, I have no idea. Any help would be appreciated. Thanks a
ton for all the help I've received in previous posts.
quickly that there's nothing too difficult for all you geniuses out there.
Here's what I'd like to do. I've got a Personel table with related contact
information and I've got a Sites table. there's a one to many relationship
between the Personel and Sites tables. Many people can be a one site. What
I'd like to do is have a form with a drop down list box that shows all of the
site names, and a button. When I click this button I want a blank email to
open up that has all of the email addresses of the individuals that are
related to that site in the To: field.
I think the code should probably look something like this but different:
***************Begginning of Code*********************
Dim objOutlook As New Outlook.Application
Dim objMail As MailItem
Set objOutlook = New Outlook.Application
Set objMail = objOutlook.CreateItem(olMailItem)
EmailAddr = Me.Email
CopyEmailAddr = ""
Subj = "Information about the FSR Update database."
Body = ""
PathName = ""
With objMail
.To = EmailAddr
.cc = CopyEmailAddr
.Subject = Subj
.Body = Body
.NoAging = True
.Display
End With
********************End of Code***********************
The EmailAddr variable will have to contain all of the email addresses of
the individuals of a certain site. I probably need a function that finds out
those email addresses that assigns them to a variable that I can call
somehow. Anyway, I have no idea. Any help would be appreciated. Thanks a
ton for all the help I've received in previous posts.