I have a class module where I'm getting a: 
Code:
Option Compare Database
Option Explicit
Dim ShellString As String
Dim ShellRC As Variant
Public WithEvents Target As Access.CommandButton
Private Sub Target_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Me.Target.Name = "cmdPrintRegistry" Then
strCurRptsPath = "c:\Asilomar\PDF-Reports"
strCurPDFName = strCurRptsPath & "\ForestLodgeRegistry.pdf"
DoCmd.OpenReport "rptEntireRegister", acViewPreview, , , acHidden
DoCmd.OutputTo acOutputReport, "rptEntireRegister", acFormatPDF, strCurPDFName
DoCmd.Close acReport, "rptEntireRegister", acSaveNo
ShellString = "c:\Windows\Explorer.exe " & """" & strCurPDFName & """"
ShellRC = Shell(ShellString, 4)
End If
End Sub
I simply want to write a report to a pdf file without previewing the report on the screen. The mode of the form with the command button is in Dialog mode, but I have other class modules in much the same condition, so I'm at a loss as to why the OutputTo would be unavailable.
Any ideas?