Emailing Forms

J

Jim/Chris

Forms are for entering, changing and viewing data. Not
for printing or emailing. Create a report replicating the
form. On the form add a command button that previews the
report. The code would look something like this
Private Sub Button_Click()
On Error GoTo Err_Button_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "ReportName"

stLinkCriteria = "[FormID]=" & Me![FormID]
DoCmd.OpenReport stDocName, acViewPreview, ,
stLinkCriteria

Exit_Button_Click:
Exit Sub

Err_Button_Click:
MsgBox Err.Description
Resume Exit_Button_Click

End Sub

I picked this up in this newsgroup. You could email the
report at that time either by a macro and the SendObject
command or in code use the DoCmd.SendObject. There are
other ways also.

Good Luck

Jim
 

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