Email current record only

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

Guest

I've read through the existing threads but can't find an answer to my
problem. I'm creating a macro to email a report in snapshot view. However,
ALL of the reports are included instead of just the current report. Is there
a code that I need to enter in the "conditions" column of the macro builder
to be able to send just the current report? Or, any suggestions on how to do
this in VB?

Thank You...
 
I have answered this in the last few days. Here is the code you would tie
to a button. This example is for an employee database, so "UserID" is the
key field.



Private Sub Print_Button_Click()

If (IsNull([UserID])) Then

' Verify the key field (UserID) has a selection

Exit Sub

End If

DoCmd.OpenReport "SomeReportName", acViewNormal, "","[UserID] =
Forms![frmSomeFormName]![UserID]"

End Sub
 

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

Back
Top