f



Help Needed With Sending Email Addresses To Outlook

I'm using the following code to send email addresses from a query to
Outlook:

Dim db As Database, rs As Recordset, sql As String, emailTo As String
Set db = CurrentDb()
emailTo = ""
sql = "select EmailAdd from qryEmailMerge"
Set rs = db.OpenRecordset(sql)
Do Until rs.EOF
    If Not IsNull(rs!EmailAdd) Then
    emailTo = emailTo & rs!EmailAdd & "; "
    End If
    rs.MoveNext
Loop
emailTo = Left(emailTo, Len(emailTo) - 1)
DoCmd.SendObject acSendNoObject, , , , , emailTo

This works well UNTIL I try to use a textbox on an unbound form to
provide "qryEmailMerge" with one or more of its parameters.  Is there
a more elegant way around this than writing the results of the query
to a temporary table and then basing "qryEmailMerge" on that table?
0
cqdigital (532)
8/27/2008 9:01:01 AM
comp.databases.ms-access 42670 articles. 0 followers. Post Follow

2 Replies
355 Views

Similar Articles

[PageSpeed] 7

What other criteria are you trying to set with the textbox values?

"Wayne" <cqdigital@volcanomail.com> wrote in message 
news:d25dd5c0-a8f4-45ca-afc4-c130762ac9f0@u33g2000pro.googlegroups.com...
> I'm using the following code to send email addresses from a query to
> Outlook:
>
> Dim db As Database, rs As Recordset, sql As String, emailTo As String
> Set db = CurrentDb()
> emailTo = ""
> sql = "select EmailAdd from qryEmailMerge"
> Set rs = db.OpenRecordset(sql)
> Do Until rs.EOF
>    If Not IsNull(rs!EmailAdd) Then
>    emailTo = emailTo & rs!EmailAdd & "; "
>    End If
>    rs.MoveNext
> Loop
> emailTo = Left(emailTo, Len(emailTo) - 1)
> DoCmd.SendObject acSendNoObject, , , , , emailTo
>
> This works well UNTIL I try to use a textbox on an unbound form to
> provide "qryEmailMerge" with one or more of its parameters.  Is there
> a more elegant way around this than writing the results of the query
> to a temporary table and then basing "qryEmailMerge" on that table? 

0
PCESoft (281)
8/29/2008 5:16:05 AM
On Aug 29, 3:16=A0pm, "ARC" <PCES...@PCESoft.invalid> wrote:
> What other criteria are you trying to set with the textbox values?
>
> "Wayne" <cqdigi...@volcanomail.com> wrote in message
>
> news:d25dd5c0-a8f4-45ca-afc4-c130762ac9f0@u33g2000pro.googlegroups.com...
>
> > I'm using the following code to send email addresses from a query to
> > Outlook:
>
> > Dim db As Database, rs As Recordset, sql As String, emailTo As String
> > Set db =3D CurrentDb()
> > emailTo =3D ""
> > sql =3D "select EmailAdd from qryEmailMerge"
> > Set rs =3D db.OpenRecordset(sql)
> > Do Until rs.EOF
> > =A0 =A0If Not IsNull(rs!EmailAdd) Then
> > =A0 =A0emailTo =3D emailTo & rs!EmailAdd & "; "
> > =A0 =A0End If
> > =A0 =A0rs.MoveNext
> > Loop
> > emailTo =3D Left(emailTo, Len(emailTo) - 1)
> > DoCmd.SendObject acSendNoObject, , , , , emailTo
>
> > This works well UNTIL I try to use a textbox on an unbound form to
> > provide "qryEmailMerge" with one or more of its parameters. =A0Is there
> > a more elegant way around this than writing the results of the query
> > to a temporary table and then basing "qryEmailMerge" on that table?

Filtering criteria for the list of people with email addresses.  eg.
Company, Location etc.
0
cqdigital (532)
8/29/2008 9:32:48 AM
Reply:

Similar Artilces:

need to send email from access HELP
Hi I hope some one can help, as i am not very good on Access I have built a database for placing orders for customers, On the Order Form i would like a button that would send out a email to say that the order has been placed, then another button that order has been despatched. I have looked on the internet for code and found sum but do not understand it. As the order form only has Customer Number im not sure how to code it to look up customers email address from tblCustomers If any one could help i would be very greatful i am able to send the database to you if u want to have a look bu...

need to send email to 1000 addresses (currently in MS Excel)- what's the best way to do that, create a mail forma and paste ALL 1000 addresses in the TO field?
Next time, try writing your message in the body, not in the subject line. Also, as a common courtesy, please include your name, or at least your handle, and email address. (It is smart to mask your email, such as "me AT domain DOT com" so that webcrawlers can't add it to spam lists.) Lastly, don't post a question that doesn't have anything to remotely do with PHP, to the PHP group. Posting to the proper group will not only get you a response faster, it will help keep the group on topic. Thanks, -Eric Kincl There is a message body to type in you know. The best ...

how to send pick up the email address from a field in a .dbf & send emails thru outlook express....
hello all: i have a client.dbf with a field: CLIENTEMAIL when my main.exe prints reminder letters, i want my main.exe to open outlook express & pick up the email address from field:CLIENTEMAIL & ALSO attach the outstanding bills .pdf file (which would be already saved using pscript32) the email body should pick up the text saved in fields: remtxt1,remtxt2,remtxt3... (i.e: the reminder letter message) regards Hi I sugest to use hb_sendmail function to send the emails Regards Luiz Em sexta-feira, 20 de fevereiro de 2015 06:21:08 UTC-2, timec...@gmail.com escreveu: > hello all: > > i have a client.dbf with a field: CLIENTEMAIL > when my main.exe prints reminder letters, i want my main.exe to open > outlook express & pick up the email address from field:CLIENTEMAIL & ALSO attach the outstanding bills .pdf file (which would be already saved using pscript32) > the email body should pick up the text saved in fields: remtxt1,remtxt2,remtxt3... > (i.e: the reminder letter message) > > regards On Friday, February 20, 2015 at 6:52:24 PM UTC+5:30, cul...@gmail.com wrote: > Hi > > I sugest to use hb_sendmail function to send the emails > > Regards > Luiz > > Em sexta-feira, 20 de fevereiro de 2015 06:21:08 UTC-2, timec...@gmail.com escreveu: > > hello all: > > > > i have a client.dbf with a field: CLIENTEMAIL > > when my main.exe prints remind...

Help with outlook Access "allow access e-mail addresses"
Hello, I have developed a Access application that needs to read mail from Outlook, versions on Access and outlook are 2003. In the code i use mapi to connect to outlook. When i tries to read the subject of a message outlook displays "A program is trying to access e-mail adresses you have stored in Outlook. Do you want to allow this." And then i can allow access for max 10 minutes. My application is use scheduled statupm creating reports without man-macine interferance so i need to disable this message. I have tried with modifiing registry KEY_CURRENT_USER\Software\Microsoft\Office...

New in MS Access, need help
Hello Everyone, I am new in MS Access and I was tasked to create a porject. I have done some initial things already but need help and guidance: - I have a text field in a form where users are allowed to enter data. I need to ensure that the value that the user enters is unique (ensure that the the value is not available in the table). How do I do that? - In the same form, I created a list box to display the existing values in the table, how do i refresh the values in the list box when the users enter a new value or updates the table Thanks, rhiz Databases and database applications don&#...

Help setting up Ms-Access Database
I'm hoping that someone here can give me some assistance with a database I'm trying to set up. My skills in Access are fairly basic, and I'm trying to skill up, but some of the stuff is a little opaque. I'm trying to put some data I've got on paper into Access. Recently, I got together with some other people marketing organic produce and offered to do some marketing for us on a coop basis in the city. The idea I had was to have four marketing packages for coop members with different rates and services. For want of something better lets call them P1, P2, P3 & P4 I&#...

Help connect Ms access database
Hello All, I am trying to connect an MS database without utilizing the help of the "querybuilder", I know how to do that using the "querybuilder" but this can't work as I am trying to do an exe file and be able to use it for other pc's that I have. I am doing the following, please correct me if I am wrong, but it is not working at all: dbpath=[matlabroot,'a\toolbox\database\dbdemos\trial.accdb']; conurl = ['jdbc:odbc:Driver={Microsoft Access Driver (*.mdb,*.accdb)};' ... 'DBQ=' dbpath] conn=database('Trial_now','','&#...

Sending and receiving emails with Ms Access
Hi. I want to make A Document Management System. Everything is fine and beautyfull but... how to hell I can receive emails with attachements, and how to store it in Access database table. I'm trying 3rd day and I can't find out enything clever. If You can help me I'll be glad and very, very happy. Maybe some useful links? Thanks in advance, Marek Bakalarczuk Check this NG and the Outlook NG on how to detach the attachments and save them to a specific folder. And why would you ever want to store this stuff in your DB when you can read the Outlook inbox directly? Well, unless...

Send email from FMP through MS Outlook
FMP 8.02, WIN XP When we try to send an email from FMP, MS Outlook give us a warning, saying that, "A program is automatically try to send an email on your behalf. Do you want to allow this?" I assume this is to catch viruses trying to propagate themselves, but it adds an unnecessary step in our process. Is there any way to configure Outlook to accept email requests without question from our FMP file? Thanks, Scott C. Scott: There is a "setting" in Ms Outlook that you can check to "allow other programs" to send mail. Thanks JC JC, I too have been seek...

need help on Access database glitch
I am using a custom built Access database from 2002. The Access version is 2003. The computer was just upgraded from Windows 98 to Vista. after the conversion, certain forms and queries don't work. It appears that the selective forms are not permitting data to be entered. however, we don't have rights management built in. The crazy thing is when a programmer friend download the database onto his computer, these forms and queries worked fine. On my end, I've used four different computers to no avail. Some were running XP, others Vista. But when I use the old computer running Windows 98, the forms and queriers work. I have opened up the forms in Design View, and made sure the editing features and data entry features were all set to "yes". So it would appear that the settings are correct. But does anyone know if there are anything else I could try, or are there other settings within Access or the actual computer that could be causing this? ...

Need help sending email programmatically
Hi all I'm writing a small app that needs to be in C++ and needs to send email from inside the program. I can do this easily in PHP, Perl and Java, but have no clue how to do it in C++. Does anyone know of free code I look at that incorporates this function? Basically, I need to send a simple email to the system support if something goes wrong in the program. The program will be running on Windows and I'll be compiling it under MinGW. Any and all help is much appreciated. Thanks Rostau wrote: > I'm writing a small app that needs to be in C++ and needs to send > email from inside the program. I can do this easily in PHP, Perl and > Java, but have no clue how to do it in C++. Well, that's understandable. There is no way to do it in C++. You need to use some kind of OS-specific facility. > Does anyone know of free code I look at that incorporates this > function? Plenty. Have you ever heard of www.google.com? > Basically, I need [..] Whatever. V -- Please remove capital 'A's when replying by e-mail I do not respond to top-posted replies, please don't ask "Rostau" <evanmorris@ananzi.co.za> wrote in message news:1147370651.848548.233440@i40g2000cwc.googlegroups.com... > Hi all > > I'm writing a small app that needs to be in C++ and needs to send email > from inside the program. I can do this easily in PHP, Perl and Java, > but have no clue how to do it in C++. > > Does anyon...

Create MS/ACCESS database app for non-ms/access users
Is it possible to create an MS/ACCESS database application and package it for users who do not have MS/ACCESS loaded in their PCs? I was told that this is possible, but I don't know what software is needed. Do you know? If so, please answer this post. Thanks. SueB *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! Per Sue Bricker: >Is it possible to create an MS/ACCESS database application and package >it for users who do not have MS/ACCESS loaded in their PCs? > >I was told that this is possible, but...

How do I export my mailboxes and Address book to MS Outlook or MS Outlook Express
Greetings I normally use Eudora for sending/receiving email for a Non Profit Society I belong to. The President & Directors of the Society want to read the Email I send/receive, but do not want to use Eudora, they want to use MS Outlook (yeh I know, but not everyone is smart like us) The Question is, how do I export the Mailboxes & Address book to MS Outlook or MS Outlook Express. Any help would be appreciated Thank You Bob Bob wrote: > > Greetings > > I normally use Eudora for sending/receiving email for a Non Profit > Society I belong to. The President & Directors of the Society want to > read the Email I send/receive, but do not want to use Eudora, they > want to use MS Outlook (yeh I know, but not everyone is smart like us) > The Question is, how do I export the Mailboxes & Address book to MS > Outlook or MS Outlook Express. You have to import them to Outlook or Outlook Express (do it from those, instead of from Eudora). In Outlook Express, go to File | Import. In MS Outlook, go to File | Import & Export. John ...

How can I send email addresses from my address book to another Eudora email user
My brother and I use Eudora. I want him to send me some of his contacts from his address book to me. Without cutting and pasting specific data from inside an address entry, how do you do this? Tony Ziolkowski <aziolk@rogers.com> wrote: > My brother and I use Eudora. I want him to send me some of his contacts from > his address book to me. Without cutting and pasting specific data from > inside an address entry, how do you do this? Have him copy the nicknames he wants to send you in a separate address book. He can then attach the address book's txt file to a message and send it to you. You can then put it in your "nicknames" subdirectory and Eudora will see it the next time you open Eudora. Note that sending text files as attachments requires having the option to include text attachments in the body of the message turned off. (Or you can zip the file before sending it.) -- Katrina ...

MS Access, send email from web host
Hi For a college project I intend to produce a web based access database which will allow a group leader to send the same email to group members registered for that group. I want the group leader to be able to: Open a web page, choose a group, write an email and send the email to the group. The database will be hosted by a web hosting company which uses server 2003 and can host an Access database with ASP.net pages - possibly oneandone.co.uk. How do I go about making the email element of this database work? I presume linking to Outlook or J mail etc will not work as I presume these will no...

Need help with email address management software
Need help with email address management software I am looking for an email address management software package that can do the following: 1. Mail Merging / Demerging capabilities... a). I will be adding to my list of email addressses from time to time. I need to make sure that I do not send an email to a person/company that I just sent an email to earlier. b). So The software should be capable of merging new lists with the old lists and highlighting the duplicates in the NEW list so I do not send these folks/companies emails again. c)...

I need Help with this MS Access 2003 Project
This is what I have to do: Create an application to automate the tasks of a medium-sized pet kennel which we'll call "Your Name Pet Hotel". The application needs to automate tasks such as: Entering customer information - name, address, etc. Entering pet information - pet name, pet breed, weight, color, (possibly a picture of the pet), medical conditions, medications, comments. Entering visit information - date of arrival and departure, details of services provided to the pet: type of kennel (indoor, outdoor, suite), grooming: haircut, nails, bath. Performing searches based on p...

Email with MS Access and CDO: showdialog before sending
I have the following example code. I'm using CDO as I need to specify the sender. Set objMessage = CreateObject("CDO.Message") objMessage.Subject = "Example CDO Message" objMessage.From = myemailaddress@dot.com objMessage.To = testaddress@dot.com objMessage.TextBody = "This is some sample message text." objMessage.Send which works, but I have 2 questions: 1. I added the code <<showDialog:=False>> (behind objMessage.Send) as I want to view the message before I confirm sending. The code is not accepted. How can I make this work? 2. I notice tha...

Help needed to connect to remote Access database
I'm working on a project which requires me to connect to a remote Access database on a server, using C++ (not MFC). I've written some code to connect to a LOCAL access database file on my own machine and everything works fine. I can't seem to figure out how to get ODBC to talk to a remote Access database though. Can anyone suggest what I might try to get this to work? To make the local access database connection I used function SQLDriverConnect. I tried modifying the connection string to include the keyword SERVER=www.myurl.com but for some reason I just get this er...

Info Help: Emailing from Access via Outlook
Hi to all! I dont know if this is possible but can someone please suggest if this is possible and if so where I could find some info on how to do it or what I should be looking for in this group. Can I set something up so that I can email from Outlook to all the customers in the query below? I have an access database which I have creatged a query that pulls results from a table with 100 customers in it. Lately I have been cutting and pasting information from the database and email every customer individualy. An example would be as follows. -------------------------------------------------...

sending email with Net::SMTP::SSL -- help needed
Hi, I am new to perl, and dont know much about CPAN and modules... What am I doing wrong in the Net::SMTP::SSL constructor?! This works fine: my $smtp_port=465; my $smtp = Net::SMTP::SSL->new(Host => "smtp.gmail.com", Port => $smtp_port); die "Couldn't connect to server" unless $smtp; But, this does NOT work: my $smtp_port=465; my $smtp_server="smtp.google.com"; my $smtp = Net::SMTP::SSL->new(Host => $smtp_server, Port => $smtp_port); die "Couldn't connect to server" unless $smtp; Error: Couldn't connect to server at...

Access to automatically send email with excel attachment through outlook
I would like ms access to send out an email through outlook, with a speicific attachment, to a group of email IDs... Could someone please help with the code? I use MS Acess 2000 & Outlook 2000 Cheers! Sunny This will be an excel attachment, which is a file not related to any query, but just placed on a drive... sunilkeswani@gmail.com wrote: > I would like ms access to send out an email through outlook, with a > speicific attachment, to a group of email IDs... > > Could someone please help with the code? I use MS Acess 2000 & Outlook > 2000 > > Cheers! > S...

Oracle Person Needs help with MS Access Queries
Hi This may be a really easy answer for you! I usually work with Oracle but have an Access project to work on. I have a table of clients (name, addr1, addr2, addr3, pcode etc) which I need to use as a basis for a query result set which will include literal values for an accounting package. The way I do this in Oracle is: select tabname.col1,tabname.col2,tabname.col3,tabname.col4,"28 Days From Receipt of Invoice","500","4027 Unrestricted Income",tabname.col5,tabname.col6 from tabname where tabname.col7=sysdate; How do I put the literal values into an Access q...

How to Compress/zip files from MS ACCESS and then send it by email?
dear all, I have a list of files that the path of that files are stored in a list box, but now want to compress all these files stored in the list box and send it by email from outlook.(I am using Ms ACCESS) any one help me. cheers khalid With Windows XP Pro in Windows Explorer I can do File | New Compressed Folder and then copy and paste whatever files I want into it... Best regards, J. Paul Schmidt, Freelance Web and Database Developer http://www.Bullschmidt.com Access Database Sample, Web Database Sample, ASP Design Tips h.khalid11@gmail.com wrote: > dear all, > I have a list of files that the path of that files are stored in a list > box, but now want to compress all these files stored in the list box > and send it by email from outlook.(I am using Ms ACCESS) > any one help me. > cheers > khalid > Why don't you bother reading the responses to the other posts you've made on this subject first. Didn't you like the responses that were provided? Do you know how to check for responses to your own posts? Salad, perhaps this is a new user who expects an e-mail response. If so, you could just reply by e-mail. That would be cutting him a lot less slack than you suggest we cut for PC Datasheet. And, if this user isn't reading newsgroup responses to his/her questions, what would make you think he would read your admonition? Larry <insert your favorite denigrating epithet here> Linson "salad" <oil@vinegar...

Web resources about - Help Needed With Sending Email Addresses To Outlook - comp.databases.ms-access

Postal addresses in the Republic of Ireland - Wikipedia, the free encyclopedia
Ireland is one of the few countries in the world, and the only EU country, that does not have a Postal code system. As of 2012, the Irish Government ...

How To: (Possibly) Restore Your Contacts After The Switch To Facebook.com Email Addresses
Still having issues with lost contacts following Facebook’s recent controversial move to make Facebook.com email addresses the default emails ...

Facebook Users Can Now Opt Into Letting Friends Export Their Email Addresses via Download Your Information ...
Previously, Facebook's Download Your Information tool let users export an archive of their status updates, photos, as well as a list of friends' ...

IPCC Chair Addresses Summit on Climate Change - Flickr - Photo Sharing!
Rajendra Pachauri, Chair of the Intergovernmental Panel on Climate Change (IPCC), addresses the opening plenary session of the Summit on Climate ...

President Bush Addresses the Nation (March 19, 2003) - YouTube
My fellow citizens, at this hour, American and coalition forces are in the early stages of military operations to disarm Iraq, to free its people ...

Full Video: Bernie Sanders addresses supporters in Michigan - Videos - CBS News
Bernie Sanders picked up projected victories in Nebraska and Kansas on Super Saturday. He addressed his supporters in Michigan, which will be ...

Cauley-Stein addresses playing time, cites 'excuse' by coaches
Skip to main content CSN Bay Area Header links TV Listings Contact App Email Follow Bar RSN login or register Login Search form Search 53° Navigation ...

Pope Francis Addresses ‘Arab Invasion’ Of Europe
Pope Francis Addresses ‘Arab Invasion’ Of Europe

O.J. Simpson Case: LAPD News Conference Addresses Possible New Evidence; No Mention Of FX Series
Los Angeles police just held a news conference to address reports that a knife was found at the site of O.J. Simpson ’s demolished former house ...

Marcia Clark Addresses Christopher Darden Romance Rumors
When ET caught up with Clark last September, the famed attorney confessed that she hopes American Crime Story will depict 'the truth' about her ...

Resources last updated: 3/20/2016 4:08:59 PM