Sending Query Results to Outlook

D

David Ehrenreich

Hello,

I have a subform setup in a Single Form View. I added a
button that should email the just the current record's
results as a excel file.

Here what I have so far

Private Sub EmailCmd_Click()
DoCmd.SendObject acSendQuery, "TodaysDataQry",_
acFormatXLS, , , , "Student Test Information", , False

When this code runs it emails the whole query.

What am I doing wrong, and or how to can I fix it.

Thank You
David Ehrenreich
 
B

Bill Nicholson

Create a copy of TodaysDataQuery in your database. Modify that new query to
filter on the current record in your subform. Use that query in your
SendObject statement.

Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top