Tech Support Guy banner
Status
Not open for further replies.
1 - 10 of 10 Posts

·
Registered
Joined
·
680 Posts
Discussion Starter · #1 ·
Hi,

I have created a form and want to be able to email the record that is on screen, can anyone help me with this.

These are the text boxes on the form:

Task Name
Assigned To
Expected completion date
Description of task

These 2 are in no table or query.
Recipient
Subject
 

·
Registered
Joined
·
19,896 Posts
Karl, you should be able to use a modified version of one of the codes on the form in the attached database.
I think you may already have a copy though.
 

Attachments

·
Registered
Joined
·
680 Posts
Discussion Starter · #4 ·
OBP i have this code below, Could you help me alter this? The reason i would prefer to use this is that the database will be on 4 different machines so when sending an email it will be from the email address being used on that machine.
 

·
Registered
Joined
·
680 Posts
Discussion Starter · #6 ·
I know, but you have to enter an email address in the code, the email address will be different on every machine. Here is the code.

Private Sub SendMailBttn_Click()
'Open an instance of microsoft outlook, name it olk.
Dim olk As Outlook.Application
Set olk = CreateObject("Outlook.application")
'Create a new, empty outlook e-mail message
Dim olkMsg As Outlook.Mailitem
Set olkMsg = olk.Createitem(olMailitem)
'Put data from form into the new message
With olkMsg
Dim OlkRecip As Outlook.Recipient
Set OlkRecip = .Recipients.Add(Me![MsgAddress])
OlkRecip.Type = olTo
.subject = Me![MsgSubject]
.Body = Me![MsgBody]
.Send
End With
Set olk = Nothing
Set olkMsg = Nothing
Set OlkRecip = Nothing
End Sub
 
1 - 10 of 10 Posts
Status
Not open for further replies.
Top