Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 1st, 2008, 01:39 PM
Registered User
 
Join Date: Mar 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default next record "line" of a database table

Hi I am using this code, which when i run a qeary it returns me in a form customer personal details.

in one column is called EMail
on the form i can click a button, which opens outook and puts the first email address into an email to ready to send.

but i want all the customers returned email adresses to be added to the same email as a global email. here is the code.... so far

Private Sub SendAnEmail_Click()
On Error GoTo ErrorHandler
Dim objOutlook As Object 'Outlook.Application
Dim EmailAddress As String

Set objOutlook = CreateObject("Outlook.Application")
Set objMailItem = objOutlook.CreateItem(0)

DoCmd.RunCommand acCmdSaveRecord
EmailAddress = Me!EMail
With objMailItem

.To = EmailAddress
.Subject = "Subject Here"
.body = "email text Here"
.display

End With

Exit Sub
ErrorHandler:
MsgBox "Error Number:" & Err.Number & "" & Err.Description

End Sub


what i need is some code in here that reads each of the next lines in the table to get just all the email addresses. i have tried with no luck... any help

regards

jofoxy





Similar Threads
Thread Thread Starter Forum Replies Last Post
Highlight complete record line Bjorn2Bjorn Access VBA 2 August 14th, 2007 04:43 AM
Results in line from sam table rodmcleay SQL Language 2 August 2nd, 2007 04:57 AM
Adding line feeds and apostrophes to a database RiffAff Classic ASP Professional 1 January 21st, 2006 05:40 PM
html table data single line -- Solved rupen HTML Code Clinic 1 August 8th, 2005 02:26 PM
Getting just one record from Table knowledge76 Access VBA 8 May 23rd, 2005 07:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.