Starting with a click on a button to open a report gives error 2046 (Run-time error 2046 the command or action 'OutputTo' isn't available now).
I work with direct path names (\\Antwerp\ ...). When starting this command and placing the report on the desktop then the report opens as a pdf. When I'm trying to place this report on the serverpath, and as mentioned above, starting it from an additonal form, then the pdf isn't opening.
What can be the problem.
- When I put a button (_Click) on a separate form called by the previous form, my report opens without any problem.
- When I put the command lines in the opening procedure of loading procedure of the second form (to prevent a button apearing) then my report gives this error.
Code:
DoCmd.OutputTo acOutputReport, "rptMyReport", acFormatPDF, strPadNameFileName, True
I work with direct path names (\\Antwerp\ ...). When starting this command and placing the report on the desktop then the report opens as a pdf. When I'm trying to place this report on the serverpath, and as mentioned above, starting it from an additonal form, then the pdf isn't opening.
What can be the problem.