L
Lauren B
I have a combo-box with 5 names in the drop down menu. When a name is
selected, I want my user to be able to click a command button that will open
an e-mail to that individual. I am attempting to write the code that will
perform this function. I tried the following:
If Me.Name = Name1 Then DoCmd.SendObject , , , "E-mail Address1"
This works for the first entry, but not for all five.
If Me.Name = Name1 Then DoCmd.SendObject , , , "E-mail Address1"
If Me.Name = Name2 Then DoCmd.SendObject , , , "E-mail Address2"
If Me.Name = Name3 Then DoCmd.SendObject , , , "E-mail Address3"
If Me.Name = Name4 Then DoCmd.SendObject , , , "E-mail Address4"
If Me.Name = Name5 Then DoCmd.SendObject , , , "E-mail Address5"
How can I write my code so that an e-mail will open when the command button
is clicked based on the name in the combo box?
Thank you in advance for any assistance.
LB
selected, I want my user to be able to click a command button that will open
an e-mail to that individual. I am attempting to write the code that will
perform this function. I tried the following:
If Me.Name = Name1 Then DoCmd.SendObject , , , "E-mail Address1"
This works for the first entry, but not for all five.
If Me.Name = Name1 Then DoCmd.SendObject , , , "E-mail Address1"
If Me.Name = Name2 Then DoCmd.SendObject , , , "E-mail Address2"
If Me.Name = Name3 Then DoCmd.SendObject , , , "E-mail Address3"
If Me.Name = Name4 Then DoCmd.SendObject , , , "E-mail Address4"
If Me.Name = Name5 Then DoCmd.SendObject , , , "E-mail Address5"
How can I write my code so that an e-mail will open when the command button
is clicked based on the name in the combo box?
Thank you in advance for any assistance.
LB