Nov 21 2022 04:45 AM
Windows 11 / Access 2021 (Version 2210 Build 16.0.15726)
Printing a form is well working:
DoCmd.SelectObject acForm, Form_MyForm.Name, True
then:
RunCommand acCmdPrint ' working well with printer dialog
or:
DoCmd.PrintOut ' working well without printer dialog
But when i start my access (accde) with option "/runtime" both versions of printing the form are not working: Error "Der Befehl oder die Aktion 'Drucken' ist zur Zeit nicht zur Verfügung".
standard printer is installed.
What can be the reason?
Thanks Peter
Nov 21 2022 05:13 AM - edited Nov 21 2022 06:16 AM
Hi,
Your code selects the form in the navigation pane which is not available in the Runtime (mode).
The best solution would be to not print a form but a report which exists for that purpose. If you select the form and File - Save As in the ribbon you can choose to save it as report.
Servus
Karl
************
Access News
Access DevCon
Nov 21 2022 08:24 AM
Thank you, Karl, yes this solution with a report ist working now. But my intention was to avoid extra reports for this purpose.
Nov 22 2022 06:04 AM
Dec 20 2022 01:01 AM
Click File > Print, and then click Print Preview. If the report is open, right-click the document tab for the report, and then click Print Preview.
Regards,
Will