G
Guest
I have used code kindly supplied by Allen Browne to make a report from the
current record
Private Sub cmdPrint_Click()
Dim strWhere As String
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[ID] = " & Me.[ID]
DoCmd.OpenReport "MyReport", acViewPreview, , strWhere
End If
End Sub
But I would now like to add some code that will email it as an attachment in
snapshot file format, so all the user has to do is add the email address.
I am a complete VB novice so step by step instructions would be good!
Can anyone help?
current record
Private Sub cmdPrint_Click()
Dim strWhere As String
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[ID] = " & Me.[ID]
DoCmd.OpenReport "MyReport", acViewPreview, , strWhere
End If
End Sub
But I would now like to add some code that will email it as an attachment in
snapshot file format, so all the user has to do is add the email address.
I am a complete VB novice so step by step instructions would be good!
Can anyone help?