wizz_darlo
Registered User.
- Local time
- Today, 01:39
- Joined
- Aug 1, 2005
- Messages
- 16
Hi, I've seen bits and pieces of the answer to this in other threads but because i'm a total newb to Vb I'm not able to piece it all together to get what I want.
Basically so far I have two buttons on my form which allow me to preview the current record in a report I made in design view, and also to print the current record in the form on a report.
However I don't seem able to figure out how to make a button send the current record in the form to an email address in .rtf or html format in the report.
Currently my button for previewing looks like this and I've had a slight go at adapting it but I always get error messages.
Private Sub Command63_Click()
Dim strReportName As String
Dim strCriteria As String
If NewRecord Then
MsgBox "This record contains no data." _
, vbInformation, "Invalid Action"
Exit Sub
Else
strReportName = "comreport1"
strCriteria = "[System Number]='" & Me![System Number] & "'"
DoCmd.OpenReport strReportName, acViewPreview, , strCriteria
End If
End Sub
Anyone who could lend a hand would be straight in to my good book!!
Basically so far I have two buttons on my form which allow me to preview the current record in a report I made in design view, and also to print the current record in the form on a report.
However I don't seem able to figure out how to make a button send the current record in the form to an email address in .rtf or html format in the report.
Currently my button for previewing looks like this and I've had a slight go at adapting it but I always get error messages.
Private Sub Command63_Click()
Dim strReportName As String
Dim strCriteria As String
If NewRecord Then
MsgBox "This record contains no data." _
, vbInformation, "Invalid Action"
Exit Sub
Else
strReportName = "comreport1"
strCriteria = "[System Number]='" & Me![System Number] & "'"
DoCmd.OpenReport strReportName, acViewPreview, , strCriteria
End If
End Sub
Anyone who could lend a hand would be straight in to my good book!!
