M
Mark Carlyle via AccessMonster.com
I am trying to print a form out to a file. I have a contract that is stored
in a form with data loaded into it. I can print the form exactly like I want
it on the printer. What I would like to do is make the print function print
it out to a file instead. I am then going to email the file as an
attachement to the same email address each time.
If there is a way to just email the form directly that would work as well.
My print statement looks like this:
Private Sub Command110_Click()
On Error GoTo Err_Command110_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Contract"
stLinkCriteria = "ID=" & Me.ID
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.PrintOut
DoCmd.Close
Exit_Command110_Click:
Exit Sub
Err_Command110_Click:
MsgBox Err.Description
Resume Exit_Command110_Click
End Sub
Thanks in advance for any help.
in a form with data loaded into it. I can print the form exactly like I want
it on the printer. What I would like to do is make the print function print
it out to a file instead. I am then going to email the file as an
attachement to the same email address each time.
If there is a way to just email the form directly that would work as well.
My print statement looks like this:
Private Sub Command110_Click()
On Error GoTo Err_Command110_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Contract"
stLinkCriteria = "ID=" & Me.ID
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.PrintOut
DoCmd.Close
Exit_Command110_Click:
Exit Sub
Err_Command110_Click:
MsgBox Err.Description
Resume Exit_Command110_Click
End Sub
Thanks in advance for any help.