Hi Guys
I have written the following code on print button but very weirdly it works fine for .accdb file but not for executable file
I get the error message "the command you specified is not available in a .mde,.accde while printing"
I have written the following code on print button but very weirdly it works fine for .accdb file but not for executable file
I get the error message "the command you specified is not available in a .mde,.accde while printing"
Code:
RName = DLookup("ReportName", "tbl_RMS_TCPrintFile", "FormName=" & Me.lstTabs)
DoCmd.OpenReport RName, acViewDesign, , , acHidden
strRecordSource = Reports(RName).RecordSource
If DCount("*", strRecordSource) > 0 Then
Me.cmdSendToPrint.BorderStyle = 1
DoCmd.OpenReport RName, acViewPreview
Me.cmdSendToPrint.BorderStyle = 0
Else
DoCmd.Close acReport, RName, acSaveNo
End If