Emailing from Access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have a form that holds various information. I would like to set up a
command button that when clicked, will automatically send a email to a
specific person based on a certain field on the form (Requestor). I need the
subject to "Task Assignment" and the text part of the email to read from the
"Item" field (The Item field represents the task) and have "- Complete" next
to it. If need be, I can put a cbo above the button and when a name is
selected, that will be who the email is sent to rather than reading the name
from the Requestor field. I guess which ever way is easier but will work more
efficiently. Please let me know if this can be accomplished and also know, I
am a rookie so please simplify.
 
You can use the SendObject command, to put in the on click event of the button

If isnull(Me.Requestor) then
msgbox "No person selected"
else
docmd.SendObject acSendNoObject,,,Me.Requestor,,,"Task Assignment" & "-
Complete",Me.Item,False
End if
 
Hi Ofer,

Yes this does help except for one thing. I am using the name of the person
in the Requestor field not the email address. How will the code capture the
email address? Could I somehow populate another field so when the Requestor
is selected, their email address populate in another field called Requestor
Email and have the command button selct from there? In otherwords,
Me.RequestorEmail or am I going about this all worng?

Thank you!
 
Does the Email Address comes from the same table as the Requestor name?
If so, create a combo, to select the Requestor name, the row source of the
combo will contain both fields
Select Requestor , [Requestor Email] From tableName

The code will look like then
If isnull(Me.Requestor) then
msgbox "No person selected"
else
docmd.SendObject acSendNoObject,,,Me.Requestor.column(1),,,"Task
Assignment" & "-
Complete",Me.Item,False
End if
====================================
If the [Requestor Email] comes from another table, you can use the dlookup
to retrive the Email Address

The code will look like then
Dim EmailAddress as String
If isnull(Me.Requestor) then
msgbox "No person selected"
else
EmailAddress = NZ(Dlookup([Requestor Email] , "tableName", "Requestor='"
& Me.Requestor & "'") , "")
If EmailAddress = "' then
msgbox "No Email Address"
else
docmd.SendObject acSendNoObject,,,EmailAddress ,,,"Task Assignment"
& "-
Complete",Me.Item,False
End if


I hope you are not getting more confused now.
 
No, I think I'm ok so far. After my meeting I will try this the first and
just add an extra column. I'll keep my fingers crossed as this would be a
really be help. Thank you so much for your help and patience. I'll let you
how I did.

Thanks Ofer!

Ofer said:
Does the Email Address comes from the same table as the Requestor name?
If so, create a combo, to select the Requestor name, the row source of the
combo will contain both fields
Select Requestor , [Requestor Email] From tableName

The code will look like then
If isnull(Me.Requestor) then
msgbox "No person selected"
else
docmd.SendObject acSendNoObject,,,Me.Requestor.column(1),,,"Task
Assignment" & "-
Complete",Me.Item,False
End if
====================================
If the [Requestor Email] comes from another table, you can use the dlookup
to retrive the Email Address

The code will look like then
Dim EmailAddress as String
If isnull(Me.Requestor) then
msgbox "No person selected"
else
EmailAddress = NZ(Dlookup([Requestor Email] , "tableName", "Requestor='"
& Me.Requestor & "'") , "")
If EmailAddress = "' then
msgbox "No Email Address"
else
docmd.SendObject acSendNoObject,,,EmailAddress ,,,"Task Assignment"
& "-
Complete",Me.Item,False
End if


I hope you are not getting more confused now.

--
I hope that helped
Good luck


Doug_C said:
Hi Ofer,

Yes this does help except for one thing. I am using the name of the person
in the Requestor field not the email address. How will the code capture the
email address? Could I somehow populate another field so when the Requestor
is selected, their email address populate in another field called Requestor
Email and have the command button selct from there? In otherwords,
Me.RequestorEmail or am I going about this all worng?

Thank you!
 
Hi Ofer,

The code is not working for some reason (either way). It gives me a Compile
error saying Expected and depending on where the mouse is will give my
different sayings. Not sure what I am doing wrong.

Ofer said:
Does the Email Address comes from the same table as the Requestor name?
If so, create a combo, to select the Requestor name, the row source of the
combo will contain both fields
Select Requestor , [Requestor Email] From tableName

The code will look like then
If isnull(Me.Requestor) then
msgbox "No person selected"
else
docmd.SendObject acSendNoObject,,,Me.Requestor.column(1),,,"Task
Assignment" & "-
Complete",Me.Item,False
End if
====================================
If the [Requestor Email] comes from another table, you can use the dlookup
to retrive the Email Address

The code will look like then
Dim EmailAddress as String
If isnull(Me.Requestor) then
msgbox "No person selected"
else
EmailAddress = NZ(Dlookup([Requestor Email] , "tableName", "Requestor='"
& Me.Requestor & "'") , "")
If EmailAddress = "' then
msgbox "No Email Address"
else
docmd.SendObject acSendNoObject,,,EmailAddress ,,,"Task Assignment"
& "-
Complete",Me.Item,False
End if


I hope you are not getting more confused now.

--
I hope that helped
Good luck


Doug_C said:
Hi Ofer,

Yes this does help except for one thing. I am using the name of the person
in the Requestor field not the email address. How will the code capture the
email address? Could I somehow populate another field so when the Requestor
is selected, their email address populate in another field called Requestor
Email and have the command button selct from there? In otherwords,
Me.RequestorEmail or am I going about this all worng?

Thank you!
 
Can you post the code you are using?

--
I hope that helped
Good luck


Doug_C said:
Hi Ofer,

The code is not working for some reason (either way). It gives me a Compile
error saying Expected and depending on where the mouse is will give my
different sayings. Not sure what I am doing wrong.

Ofer said:
Does the Email Address comes from the same table as the Requestor name?
If so, create a combo, to select the Requestor name, the row source of the
combo will contain both fields
Select Requestor , [Requestor Email] From tableName

The code will look like then
If isnull(Me.Requestor) then
msgbox "No person selected"
else
docmd.SendObject acSendNoObject,,,Me.Requestor.column(1),,,"Task
Assignment" & "-
Complete",Me.Item,False
End if
====================================
If the [Requestor Email] comes from another table, you can use the dlookup
to retrive the Email Address

The code will look like then
Dim EmailAddress as String
If isnull(Me.Requestor) then
msgbox "No person selected"
else
EmailAddress = NZ(Dlookup([Requestor Email] , "tableName", "Requestor='"
& Me.Requestor & "'") , "")
If EmailAddress = "' then
msgbox "No Email Address"
else
docmd.SendObject acSendNoObject,,,EmailAddress ,,,"Task Assignment"
& "-
Complete",Me.Item,False
End if


I hope you are not getting more confused now.

--
I hope that helped
Good luck


Doug_C said:
Hi Ofer,

Yes this does help except for one thing. I am using the name of the person
in the Requestor field not the email address. How will the code capture the
email address? Could I somehow populate another field so when the Requestor
is selected, their email address populate in another field called Requestor
Email and have the command button selct from there? In otherwords,
Me.RequestorEmail or am I going about this all worng?

Thank you!

:

You can use the SendObject command, to put in the on click event of the button

If isnull(Me.Requestor) then
msgbox "No person selected"
else
docmd.SendObject acSendNoObject,,,Me.Requestor,,,"Task Assignment" & "-
Complete",Me.Item,False
End if
--
I hope that helped
Good luck


:

Hello,

I have a form that holds various information. I would like to set up a
command button that when clicked, will automatically send a email to a
specific person based on a certain field on the form (Requestor). I need the
subject to "Task Assignment" and the text part of the email to read from the
"Item" field (The Item field represents the task) and have "- Complete" next
to it. If need be, I can put a cbo above the button and when a name is
selected, that will be who the email is sent to rather than reading the name
from the Requestor field. I guess which ever way is easier but will work more
efficiently. Please let me know if this can be accomplished and also know, I
am a rookie so please simplify.
 
This is the first one I tried where I have the table with two fields. Column
one is the Requestor and column two is their email address.

Private Sub Email_Click()
If IsNull(Me.Requestor) Then
MsgBox "No person selected"
Else
DoCmd.SendObject acSendNoObject, , , Me.Requestor.Column(1), , , "Task "
Assignment" & "-
Complete ",Me.Item,False"
End If

End Sub

Where Assignment" & "- is, that part of the code is in red but the rest is
in black. I'm guessing if it stop at that part, the rest of the code must be
find until there. Here is what my row source looks like in the Requestors cbo:
SELECT tblrequestor.Requestor FROM tblrequestor;

I am most definite it is a user problem. If you are able to decipher and
walk me through it, I would be personally grateful.

Thank you!

Ofer said:
Can you post the code you are using?

--
I hope that helped
Good luck


Doug_C said:
Hi Ofer,

The code is not working for some reason (either way). It gives me a Compile
error saying Expected and depending on where the mouse is will give my
different sayings. Not sure what I am doing wrong.

Ofer said:
Does the Email Address comes from the same table as the Requestor name?
If so, create a combo, to select the Requestor name, the row source of the
combo will contain both fields
Select Requestor , [Requestor Email] From tableName

The code will look like then
If isnull(Me.Requestor) then
msgbox "No person selected"
else
docmd.SendObject acSendNoObject,,,Me.Requestor.column(1),,,"Task
Assignment" & "-
Complete",Me.Item,False
End if
====================================
If the [Requestor Email] comes from another table, you can use the dlookup
to retrive the Email Address

The code will look like then
Dim EmailAddress as String
If isnull(Me.Requestor) then
msgbox "No person selected"
else
EmailAddress = NZ(Dlookup([Requestor Email] , "tableName", "Requestor='"
& Me.Requestor & "'") , "")
If EmailAddress = "' then
msgbox "No Email Address"
else
docmd.SendObject acSendNoObject,,,EmailAddress ,,,"Task Assignment"
& "-
Complete",Me.Item,False
End if


I hope you are not getting more confused now.

--
I hope that helped
Good luck


:

Hi Ofer,

Yes this does help except for one thing. I am using the name of the person
in the Requestor field not the email address. How will the code capture the
email address? Could I somehow populate another field so when the Requestor
is selected, their email address populate in another field called Requestor
Email and have the command button selct from there? In otherwords,
Me.RequestorEmail or am I going about this all worng?

Thank you!

:

You can use the SendObject command, to put in the on click event of the button

If isnull(Me.Requestor) then
msgbox "No person selected"
else
docmd.SendObject acSendNoObject,,,Me.Requestor,,,"Task Assignment" & "-
Complete",Me.Item,False
End if
--
I hope that helped
Good luck


:

Hello,

I have a form that holds various information. I would like to set up a
command button that when clicked, will automatically send a email to a
specific person based on a certain field on the form (Requestor). I need the
subject to "Task Assignment" and the text part of the email to read from the
"Item" field (The Item field represents the task) and have "- Complete" next
to it. If need be, I can put a cbo above the button and when a name is
selected, that will be who the email is sent to rather than reading the name
from the Requestor field. I guess which ever way is easier but will work more
efficiently. Please let me know if this can be accomplished and also know, I
am a rookie so please simplify.
 
Try this

DoCmd.SendObject acSendNoObject, , , Me.Requestor.Column(1), , , "Task
Assignment - Complete",Me.Item ,False

--
I hope that helped
Good luck


Doug_C said:
This is the first one I tried where I have the table with two fields. Column
one is the Requestor and column two is their email address.

Private Sub Email_Click()
If IsNull(Me.Requestor) Then
MsgBox "No person selected"
Else
DoCmd.SendObject acSendNoObject, , , Me.Requestor.Column(1), , , "Task "
Assignment" & "-
Complete ",Me.Item,False"
End If

End Sub

Where Assignment" & "- is, that part of the code is in red but the rest is
in black. I'm guessing if it stop at that part, the rest of the code must be
find until there. Here is what my row source looks like in the Requestors cbo:
SELECT tblrequestor.Requestor FROM tblrequestor;

I am most definite it is a user problem. If you are able to decipher and
walk me through it, I would be personally grateful.

Thank you!

Ofer said:
Can you post the code you are using?

--
I hope that helped
Good luck


Doug_C said:
Hi Ofer,

The code is not working for some reason (either way). It gives me a Compile
error saying Expected and depending on where the mouse is will give my
different sayings. Not sure what I am doing wrong.

:

Does the Email Address comes from the same table as the Requestor name?
If so, create a combo, to select the Requestor name, the row source of the
combo will contain both fields
Select Requestor , [Requestor Email] From tableName

The code will look like then
If isnull(Me.Requestor) then
msgbox "No person selected"
else
docmd.SendObject acSendNoObject,,,Me.Requestor.column(1),,,"Task
Assignment" & "-
Complete",Me.Item,False
End if
====================================
If the [Requestor Email] comes from another table, you can use the dlookup
to retrive the Email Address

The code will look like then
Dim EmailAddress as String
If isnull(Me.Requestor) then
msgbox "No person selected"
else
EmailAddress = NZ(Dlookup([Requestor Email] , "tableName", "Requestor='"
& Me.Requestor & "'") , "")
If EmailAddress = "' then
msgbox "No Email Address"
else
docmd.SendObject acSendNoObject,,,EmailAddress ,,,"Task Assignment"
& "-
Complete",Me.Item,False
End if


I hope you are not getting more confused now.

--
I hope that helped
Good luck


:

Hi Ofer,

Yes this does help except for one thing. I am using the name of the person
in the Requestor field not the email address. How will the code capture the
email address? Could I somehow populate another field so when the Requestor
is selected, their email address populate in another field called Requestor
Email and have the command button selct from there? In otherwords,
Me.RequestorEmail or am I going about this all worng?

Thank you!

:

You can use the SendObject command, to put in the on click event of the button

If isnull(Me.Requestor) then
msgbox "No person selected"
else
docmd.SendObject acSendNoObject,,,Me.Requestor,,,"Task Assignment" & "-
Complete",Me.Item,False
End if
--
I hope that helped
Good luck


:

Hello,

I have a form that holds various information. I would like to set up a
command button that when clicked, will automatically send a email to a
specific person based on a certain field on the form (Requestor). I need the
subject to "Task Assignment" and the text part of the email to read from the
"Item" field (The Item field represents the task) and have "- Complete" next
to it. If need be, I can put a cbo above the button and when a name is
selected, that will be who the email is sent to rather than reading the name
from the Requestor field. I guess which ever way is easier but will work more
efficiently. Please let me know if this can be accomplished and also know, I
am a rookie so please simplify.
 
No, it still has the code from Assignment on down in red. Is there something
I should be checking? Maybe I have something set up worng in a table or on
the form or maybe the field?

Ofer said:
Try this

DoCmd.SendObject acSendNoObject, , , Me.Requestor.Column(1), , , "Task
Assignment - Complete",Me.Item ,False

--
I hope that helped
Good luck


Doug_C said:
This is the first one I tried where I have the table with two fields. Column
one is the Requestor and column two is their email address.

Private Sub Email_Click()
If IsNull(Me.Requestor) Then
MsgBox "No person selected"
Else
DoCmd.SendObject acSendNoObject, , , Me.Requestor.Column(1), , , "Task "
Assignment" & "-
Complete ",Me.Item,False"
End If

End Sub

Where Assignment" & "- is, that part of the code is in red but the rest is
in black. I'm guessing if it stop at that part, the rest of the code must be
find until there. Here is what my row source looks like in the Requestors cbo:
SELECT tblrequestor.Requestor FROM tblrequestor;

I am most definite it is a user problem. If you are able to decipher and
walk me through it, I would be personally grateful.

Thank you!

Ofer said:
Can you post the code you are using?

--
I hope that helped
Good luck


:

Hi Ofer,

The code is not working for some reason (either way). It gives me a Compile
error saying Expected and depending on where the mouse is will give my
different sayings. Not sure what I am doing wrong.

:

Does the Email Address comes from the same table as the Requestor name?
If so, create a combo, to select the Requestor name, the row source of the
combo will contain both fields
Select Requestor , [Requestor Email] From tableName

The code will look like then
If isnull(Me.Requestor) then
msgbox "No person selected"
else
docmd.SendObject acSendNoObject,,,Me.Requestor.column(1),,,"Task
Assignment" & "-
Complete",Me.Item,False
End if
====================================
If the [Requestor Email] comes from another table, you can use the dlookup
to retrive the Email Address

The code will look like then
Dim EmailAddress as String
If isnull(Me.Requestor) then
msgbox "No person selected"
else
EmailAddress = NZ(Dlookup([Requestor Email] , "tableName", "Requestor='"
& Me.Requestor & "'") , "")
If EmailAddress = "' then
msgbox "No Email Address"
else
docmd.SendObject acSendNoObject,,,EmailAddress ,,,"Task Assignment"
& "-
Complete",Me.Item,False
End if


I hope you are not getting more confused now.

--
I hope that helped
Good luck


:

Hi Ofer,

Yes this does help except for one thing. I am using the name of the person
in the Requestor field not the email address. How will the code capture the
email address? Could I somehow populate another field so when the Requestor
is selected, their email address populate in another field called Requestor
Email and have the command button selct from there? In otherwords,
Me.RequestorEmail or am I going about this all worng?

Thank you!

:

You can use the SendObject command, to put in the on click event of the button

If isnull(Me.Requestor) then
msgbox "No person selected"
else
docmd.SendObject acSendNoObject,,,Me.Requestor,,,"Task Assignment" & "-
Complete",Me.Item,False
End if
--
I hope that helped
Good luck


:

Hello,

I have a form that holds various information. I would like to set up a
command button that when clicked, will automatically send a email to a
specific person based on a certain field on the form (Requestor). I need the
subject to "Task Assignment" and the text part of the email to read from the
"Item" field (The Item field represents the task) and have "- Complete" next
to it. If need be, I can put a cbo above the button and when a name is
selected, that will be who the email is sent to rather than reading the name
from the Requestor field. I guess which ever way is easier but will work more
efficiently. Please let me know if this can be accomplished and also know, I
am a rookie so please simplify.
 
If you copy and paste the line I gave you, it might start a new line, make it
one line, and delete the Quote (") symbol in the end, if access add it up
automatically.

So the sunject should be

"Task Assignment - Complete"
and not
"Task "Assignment - Complete"

=====
I hope that helped
Good luck


Doug_C said:
No, it still has the code from Assignment on down in red. Is there something
I should be checking? Maybe I have something set up worng in a table or on
the form or maybe the field?

Ofer said:
Try this

DoCmd.SendObject acSendNoObject, , , Me.Requestor.Column(1), , , "Task
Assignment - Complete",Me.Item ,False

--
I hope that helped
Good luck


Doug_C said:
This is the first one I tried where I have the table with two fields. Column
one is the Requestor and column two is their email address.

Private Sub Email_Click()
If IsNull(Me.Requestor) Then
MsgBox "No person selected"
Else
DoCmd.SendObject acSendNoObject, , , Me.Requestor.Column(1), , , "Task "
Assignment" & "-
Complete ",Me.Item,False"
End If

End Sub

Where Assignment" & "- is, that part of the code is in red but the rest is
in black. I'm guessing if it stop at that part, the rest of the code must be
find until there. Here is what my row source looks like in the Requestors cbo:
SELECT tblrequestor.Requestor FROM tblrequestor;

I am most definite it is a user problem. If you are able to decipher and
walk me through it, I would be personally grateful.

Thank you!

:

Can you post the code you are using?

--
I hope that helped
Good luck


:

Hi Ofer,

The code is not working for some reason (either way). It gives me a Compile
error saying Expected and depending on where the mouse is will give my
different sayings. Not sure what I am doing wrong.

:

Does the Email Address comes from the same table as the Requestor name?
If so, create a combo, to select the Requestor name, the row source of the
combo will contain both fields
Select Requestor , [Requestor Email] From tableName

The code will look like then
If isnull(Me.Requestor) then
msgbox "No person selected"
else
docmd.SendObject acSendNoObject,,,Me.Requestor.column(1),,,"Task
Assignment" & "-
Complete",Me.Item,False
End if
====================================
If the [Requestor Email] comes from another table, you can use the dlookup
to retrive the Email Address

The code will look like then
Dim EmailAddress as String
If isnull(Me.Requestor) then
msgbox "No person selected"
else
EmailAddress = NZ(Dlookup([Requestor Email] , "tableName", "Requestor='"
& Me.Requestor & "'") , "")
If EmailAddress = "' then
msgbox "No Email Address"
else
docmd.SendObject acSendNoObject,,,EmailAddress ,,,"Task Assignment"
& "-
Complete",Me.Item,False
End if


I hope you are not getting more confused now.

--
I hope that helped
Good luck


:

Hi Ofer,

Yes this does help except for one thing. I am using the name of the person
in the Requestor field not the email address. How will the code capture the
email address? Could I somehow populate another field so when the Requestor
is selected, their email address populate in another field called Requestor
Email and have the command button selct from there? In otherwords,
Me.RequestorEmail or am I going about this all worng?

Thank you!

:

You can use the SendObject command, to put in the on click event of the button

If isnull(Me.Requestor) then
msgbox "No person selected"
else
docmd.SendObject acSendNoObject,,,Me.Requestor,,,"Task Assignment" & "-
Complete",Me.Item,False
End if
--
I hope that helped
Good luck


:

Hello,

I have a form that holds various information. I would like to set up a
command button that when clicked, will automatically send a email to a
specific person based on a certain field on the form (Requestor). I need the
subject to "Task Assignment" and the text part of the email to read from the
"Item" field (The Item field represents the task) and have "- Complete" next
to it. If need be, I can put a cbo above the button and when a name is
selected, that will be who the email is sent to rather than reading the name
from the Requestor field. I guess which ever way is easier but will work more
efficiently. Please let me know if this can be accomplished and also know, I
am a rookie so please simplify.
 
No, it comes up with a Compile Error saying "Syntax Error". I did find
another database with this feature that I copied the code from and works but
not exactly how I want it. I will have to try and manipulate it a little.
Thank you very much for staying with me on this and I greatly appreciate your
help. I am sure I will have other help question on this database to post.

Thanks Ofer!!

Ofer said:
If you copy and paste the line I gave you, it might start a new line, make it
one line, and delete the Quote (") symbol in the end, if access add it up
automatically.

So the sunject should be

"Task Assignment - Complete"
and not
"Task "Assignment - Complete"

=====
I hope that helped
Good luck


Doug_C said:
No, it still has the code from Assignment on down in red. Is there something
I should be checking? Maybe I have something set up worng in a table or on
the form or maybe the field?

Ofer said:
Try this

DoCmd.SendObject acSendNoObject, , , Me.Requestor.Column(1), , , "Task
Assignment - Complete",Me.Item ,False

--
I hope that helped
Good luck


:

This is the first one I tried where I have the table with two fields. Column
one is the Requestor and column two is their email address.

Private Sub Email_Click()
If IsNull(Me.Requestor) Then
MsgBox "No person selected"
Else
DoCmd.SendObject acSendNoObject, , , Me.Requestor.Column(1), , , "Task "
Assignment" & "-
Complete ",Me.Item,False"
End If

End Sub

Where Assignment" & "- is, that part of the code is in red but the rest is
in black. I'm guessing if it stop at that part, the rest of the code must be
find until there. Here is what my row source looks like in the Requestors cbo:
SELECT tblrequestor.Requestor FROM tblrequestor;

I am most definite it is a user problem. If you are able to decipher and
walk me through it, I would be personally grateful.

Thank you!

:

Can you post the code you are using?

--
I hope that helped
Good luck


:

Hi Ofer,

The code is not working for some reason (either way). It gives me a Compile
error saying Expected and depending on where the mouse is will give my
different sayings. Not sure what I am doing wrong.

:

Does the Email Address comes from the same table as the Requestor name?
If so, create a combo, to select the Requestor name, the row source of the
combo will contain both fields
Select Requestor , [Requestor Email] From tableName

The code will look like then
If isnull(Me.Requestor) then
msgbox "No person selected"
else
docmd.SendObject acSendNoObject,,,Me.Requestor.column(1),,,"Task
Assignment" & "-
Complete",Me.Item,False
End if
====================================
If the [Requestor Email] comes from another table, you can use the dlookup
to retrive the Email Address

The code will look like then
Dim EmailAddress as String
If isnull(Me.Requestor) then
msgbox "No person selected"
else
EmailAddress = NZ(Dlookup([Requestor Email] , "tableName", "Requestor='"
& Me.Requestor & "'") , "")
If EmailAddress = "' then
msgbox "No Email Address"
else
docmd.SendObject acSendNoObject,,,EmailAddress ,,,"Task Assignment"
& "-
Complete",Me.Item,False
End if


I hope you are not getting more confused now.

--
I hope that helped
Good luck


:

Hi Ofer,

Yes this does help except for one thing. I am using the name of the person
in the Requestor field not the email address. How will the code capture the
email address? Could I somehow populate another field so when the Requestor
is selected, their email address populate in another field called Requestor
Email and have the command button selct from there? In otherwords,
Me.RequestorEmail or am I going about this all worng?

Thank you!

:

You can use the SendObject command, to put in the on click event of the button

If isnull(Me.Requestor) then
msgbox "No person selected"
else
docmd.SendObject acSendNoObject,,,Me.Requestor,,,"Task Assignment" & "-
Complete",Me.Item,False
End if
--
I hope that helped
Good luck


:

Hello,

I have a form that holds various information. I would like to set up a
command button that when clicked, will automatically send a email to a
specific person based on a certain field on the form (Requestor). I need the
subject to "Task Assignment" and the text part of the email to read from the
"Item" field (The Item field represents the task) and have "- Complete" next
to it. If need be, I can put a cbo above the button and when a name is
selected, that will be who the email is sent to rather than reading the name
from the Requestor field. I guess which ever way is easier but will work more
efficiently. Please let me know if this can be accomplished and also know, I
am a rookie so please simplify.
 
Back
Top