I have a field called email in my database (Access 2000). Can I make it automatically convert to a hyperlink that will open the users outlook with the correct address in the To line or the mail when clicked on? Learn something new every day *:->*
You'll have to help a thicky a bit more. This is what I did. I clicked on the text box that holds my email address (called E_mail). Opened the properties and gone into event procedure. I then put this in the box.
Sub E-mail_Click()
DoCmd.SendObject,,, Me(E_mail),,,,,True
End Sub
When I then click on the text box in the form I get this message. Runtime error 2465
Microsoft Access can't find the field 'jdoe@hotmail.com#
Ben ----------------------------------------
Ben O'Hara
Home: bpo@SickOfSpam.RobotParade.co.uk
Work: bo104@SickOfSpam.westyorkshire.pnn.police.uk
(in case you've not worked it out get rid of Sick Of Spam to mail me!)
Web:
You're getting the error message because Me(E_Mail) tries to find the control having the name of whatever is displayed in the control E_mail.
VB notation can be puzzling sometimes...
I have just had a chance to do this in the way that you described. Excellent. I have got it automatically sending an email including all the details of address of a site and a subject heading and filling in the Dear "Name" with all the fields being pulled straight from the database. It also sends copies to relevant people automatically. I don't know if it will allow me to give you another star but I will try.
How do you send an email to all the e mail addresses returned by a query. I want to send the message to 1 pre-designated person and the BCC the same message to any number of users.
This is not for Spam mail but an internal variabl list of staff
Neil Berryman
IT Trainer
neil_berryman@btopenworld.com
Create your Query with a field called EMAIL and any other fields you might want to pick up in the document. Now create a Word Mail Merge document (Form Letter) with the message that you want in it linked to the query as the data source. Then click on Merge in the word document and choose Electronic Mail.
This will send to everyone in the query seperately. In other words in the same way as if you had sent it by BCC..
I know I've posted this before, but I couldn't find it, so I'll post it again:
Function ColumnToLine(TblQueryName, ColumnName)
On Error GoTo ErrInFunction
Dim myRs As DAO.Recordset
Dim ResultString As String
Set myRs = CurrentDb.OpenRecordset(TblQueryName)
If myRs.RecordCount > 0 Then
Do Until myRs.EOF
ColumnToLine = ColumnToLine & IIf(Len(ColumnToLine) = 0, "", "; " & myRs(ColumnName)
myRs.MoveNext
Loop
End If
FinishPoint:
On Error Resume Next
myRs.Close
Exit Function
ErrInFunction:
ColumnToLine = "Error: " & Err.Description
Resume FinishPoint
Exit Function
End Function
This function gets all values in a column of data and builds a string (values are separated by semicolon).
Just pass the ColumnToLine result to the BCC field.
Good luck
Daniel Vlas
Systems Consultant
danvlas@yahoo.com
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.