Sending Query Results to Outlook

  • Thread starter Thread starter David Ehrenreich
  • Start date Start date
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
 
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
 
Back
Top