Thank you! Your awesome! This is what the code ended up looking like, and I have ran it on multiple tables now to get emails, but how does strEmails "know" what it's value is. It is dim'd @ the start of the code, but never "set" to = anything....I appreciate your help, just trying to understand the "why" behind what I did.
With rs .MoveFirst Do Until .EOF EmailAddress = ![Email] .MoveNext strEmails = strEmails & EmailAddress & ";" Loop OMsg.To = strEmails OMsg.Display
Reply from Alex Hedley:
You set it here with the assignment operator "=" strEmails = strEmails & EmailAddress & ";"
So you have a list Fred, Joe, Alice, Bill
strEmails = "" First loop strEmails = "Fred" Second strEmails = "Fred; Joe" etc
So its saying get what strEmails currently is and add on another string then set this back to itself so it overwrites the first person with the first and second person (lather, rinse, repeat to quote friends)
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.