#  Other Applications & Softwares  > Access Tables & Databases >  > [SOLVED] Collect Data Via Email and Add Attachment

## Excel4444

I have a database that has a tblNewRecords that I am using to collect new requests. I am then turning around and sending those requests via an update query to a new table that is used while generating "collect data" emails. Ideally, I would prefer to send "collect data" emails that are going to update records, but I need to include an attachment in that email and when you "update" vs. "new" in the collect data wizard you're not presented with a physical email before it's sent. 

Is there a way to update records and attach a file?

Thanks!

----------


## ranman256

run the update query:
docmd.openquery

then send the email with the query:
docmd.sendobject

----------


## Excel4444

Can you elaborate?

How are you using the docmd.sendobject and Collect Data function or are you replacing the Collect Data step? And then how are you sending that record and including the attachment?

Thanks!

----------


## alansidman

This is an older tutorial using AC 2003, but the same principals apply with the SendObject command.

http://www.datapigtechnologies.com/f...sendemail.html

----------


## Excel4444

This is good!

Also, is there a way to I guess import the attachment that's sent with a Collect Data reply. Example is, database sends out Collect Data email with fields to fill in that will later populate a record and that reply back to the database includes an attachment. If the table already has an attachment field, can the database import the attachment to the record?

Thank!

----------


## alansidman

I have never used this wizard, but from what MS says, that may not be possible

https://support.office.com/en-US/art...C-A4E41A14FA98

----------


## Excel4444

darn it!

ok, well thanks for calling that out and sharing the MS Support link. 

Thanks.

----------

