B
Bill
I’m a newbe to access and trying to learn as I develop. I’ve learned a
little but I’m stumped! I’ve downloaded Steven Leban’s ReportToPDF and need
to “filter†it to the current report. So to me it makes sense to first print
the current report:
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 = "[ReportID] = """ & Me.[ReportID] & """"
DoCmd.OpenReport "IR_Report", acViewPreview, , strWhere
End If
Then call the ReportToPDF function:
Dim blRet As Boolean
' Call our convert function
' Please note the last param signals whether to perform
' font embedding or not. I have turned font embedding ON for this example.
blRet = ConvertReportToPDF(Me.[IR_Report], vbNullString, _
Me.[IR_Report].Value & ".pdf", False, True, 150, "", "", 0, 0, 0)
' To modify the above call to force the File Save Dialog to select the name
and path
' for the saved PDF file simply change the ShowSaveFileDialog param to TRUE.
End Sub
But I get the error of “Microsoft Office Access can’t find the field ‘|’
referred to in your expression.
Where is this coming from?? I’m sooo lost!!!
Thanks for the help
Bill
stLinkCriteria = "[Some Field]=" & "'" & msomevalue & "'"
DoCmd.OpenReport stDocName, acViewPreview, , stLinkCriteria
DoCmd.Minimize
Call convertreporttopdf(stDocName, ,
strPDFOutputFilePathAndName & ".pdf", False, False)
DoCmd.Close acReport, stDocName
little but I’m stumped! I’ve downloaded Steven Leban’s ReportToPDF and need
to “filter†it to the current report. So to me it makes sense to first print
the current report:
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 = "[ReportID] = """ & Me.[ReportID] & """"
DoCmd.OpenReport "IR_Report", acViewPreview, , strWhere
End If
Then call the ReportToPDF function:
Dim blRet As Boolean
' Call our convert function
' Please note the last param signals whether to perform
' font embedding or not. I have turned font embedding ON for this example.
blRet = ConvertReportToPDF(Me.[IR_Report], vbNullString, _
Me.[IR_Report].Value & ".pdf", False, True, 150, "", "", 0, 0, 0)
' To modify the above call to force the File Save Dialog to select the name
and path
' for the saved PDF file simply change the ShowSaveFileDialog param to TRUE.
End Sub
But I get the error of “Microsoft Office Access can’t find the field ‘|’
referred to in your expression.
Where is this coming from?? I’m sooo lost!!!
Thanks for the help
Bill
stLinkCriteria = "[Some Field]=" & "'" & msomevalue & "'"
DoCmd.OpenReport stDocName, acViewPreview, , stLinkCriteria
DoCmd.Minimize
Call convertreporttopdf(stDocName, ,
strPDFOutputFilePathAndName & ".pdf", False, False)
DoCmd.Close acReport, stDocName