J
jv
Hi,
I would like my form to send the current record to a
report and then output to e-mail through macro. Here is
my code, how do I incorporate a macro for it? I already
have a macro but it prints every record not the current
record. thanks.
Private Sub cmdReferral1_Click()
On Error GoTo Err_cmdReferral1_Click
Dim stDocName As String
Dim strCriteria As String
stDocName = "rptReferenceForm"
strCriteria = "[ID]='" & Me![ID] & "'"
DoCmd.OpenReport stDocName, acPreview, strCriteria
Exit_cmdReferral1_Click:
Exit Sub
Err_cmdReferral1_Click:
MsgBox Err.Description
Resume Exit_cmdReferral1_Click
End Sub
I would like my form to send the current record to a
report and then output to e-mail through macro. Here is
my code, how do I incorporate a macro for it? I already
have a macro but it prints every record not the current
record. thanks.
Private Sub cmdReferral1_Click()
On Error GoTo Err_cmdReferral1_Click
Dim stDocName As String
Dim strCriteria As String
stDocName = "rptReferenceForm"
strCriteria = "[ID]='" & Me![ID] & "'"
DoCmd.OpenReport stDocName, acPreview, strCriteria
Exit_cmdReferral1_Click:
Exit Sub
Err_cmdReferral1_Click:
MsgBox Err.Description
Resume Exit_cmdReferral1_Click
End Sub