Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reply email in access

Status
Not open for further replies.

jagnval

Technical User
Feb 19, 2009
10
US
We are using access as a maintenance task list to keep track of maintenance needed around our facility. I have created a form that has all our info needed and that is emailed to our facility manager to assign people to, after he uses the another form to assign it to someone on the close button I have installed a micro that will send and email, right now the outlook window will come up but the "TO:" field is blank, because i left it blank on the micro, but I was wanting to know if there was a way to first look up who sent in the request, (there are about 50 or so people that are authorized to use the database) and reply an email back to that specific requester automatically. As far as I can see the "sendobject" micro will only send to who you specify in the micro, and is not able to look up names and then reply. I guess my question is can you put an expression in the "TO:" field of the "sendobject" micro to have it look and reply an email to the requester that sent in the last request. this seems like a very common task to handle in access, please help.
 
I haven't done very much at all with code, but willing to give it a try with some instructions and help
 
You will just need a little code in the click event of the button. The click event should be set to [Event procedure] and then click on the three dots to the right of this to open the code window. You can save your macro as code, if you want a cut-and-paste for the event.

It would look something like this:

Code:
Private Sub cmdEmail_Click()
'Syntax:
'DoCmd.SendObject [objecttype][, objectname][, outputformat][, to]
'[, cc][, bcc][, subject][, messagetext][, editmessage][, templatefile]

    DoCmd.SendObject acSendForm, Me.Name, acFormatRTF, Me.txtAssignedTo, _
    Me.txtReceivedFrom, , Me.txtDecription, Me.txtMessage

End Sub

I have visualized here a form with several textboxes:
Me.txtAssignedTo,
Me.txtReceivedFrom,
Me.txtDecription,
Me.txtMessage

However, this will not be the same as your set-up, so I will toss this back to you for more information on where the information is stored.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top