General discussion

  • Creator
    Topic
  • #2306481

    Access XP Print Control

    Locked

    by mschulman ·

    I need to modify a command button to print to a specific network printer. It currently prints directly to the user’s default printer. I believe I have to modify the event code, but I’m not sure how.

All Comments

  • Author
    Replies
    • #3357007

      Access XP Print Control

      by kees.valkenswaard ·

      In reply to Access XP Print Control

      You did not specify from where you want to print. Suppose it is from Word or another Office program. In that case you would have to record a simple macro in which you switch to the required printer [so make sure another printer is set before you start the new macro] and subsequently print. Make the macro part of e.g. normal.dot [when using Word]. Add a button [with Tools, customize] to which you connect the new macro. That is it.
      You may which to add another button for the default user printer, as after hitting your special button other documents within the same session would be printed on the same printer.
      Good luck.

      • #3356982

        Access XP Print Control

        by mschulman ·

        In reply to Access XP Print Control

        The title is “Access XP Print Control”. I need to modify a command button on an existing form to print a report in Access that currently prints only to the default printer.

    • #3358670

      Access XP Print Control

      by jackofalltech ·

      In reply to Access XP Print Control

      On the assumption you’re only asking how to get into the code, open the form in design mode and double-click on the command button in question.

      If you’re asking for the code itself, I’ll need a LOT more info. Send me a copy of the current event code, and the name of the network printer you want to use and I might be able to help you.

      Ralph

    • #3531744

      Access XP Print Control

      by saqibmabbasi ·

      In reply to Access XP Print Control

      Hello,
      you can use the following command in the click event of the CommandButton on the form in an Access database.

      CODE:
      DoCmd.OpenReport strReportName, strPrinterName

      here
      strReportName = this is the name of the Report.
      strPrinterName = this is the name of the Printer.

      you can even specify other printers in a list ad select your desired printer. to do this use the Printer Object.

      hope this helps.
      Take care.

    • #3532754

      Access XP Print Control

      by mschulman ·

      In reply to Access XP Print Control

      This question was closed by the author

Viewing 3 reply threads