• PrtDevMode Property to change printer for a form (2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » PrtDevMode Property to change printer for a form (2000)

    Author
    Topic
    #390167

    I am becoming familiar with the PrtDevMode property, specificially in order to give the user a choice of printer or fax when printing the selected record. I will have one button for each one on the form.

    The PrtDevMode property is read/write in Design view only, so I believe that I will have to flip the form into Design view, assign the printer, and save the form. If I get to that point, I wonder if having the form in a multi-user environment will cause problems.

    I have tried the code from Access help which prompts for the page width and length, and I have the Microsoft Access 95 Developer’s Handbook which goes into detail about using this property. Hopefully, I will be able to use both to get what I want.

    Has anyone used this property to do what I’m trying? Can you tell me if I’m proceeding in the right direction in order to do what I want. Was there any problem doing this with in a multi-user environment? Any coding suggestions / pitfalls etc.?

    Thanks,

    Howard

    Viewing 1 reply thread
    Author
    Replies
    • #692043

      If I was doing it I would just create a report rather than printing the form itself. Once the report is how I wanted it I would just copy it and set up one copy to print to the printer and the other to the Fax

      2cents

      Peter

    • #692047

      In Access 2000 and up, you can’t save design changes to a form or report if more than one user has the database open; you need to open the database exclusively to be able to change the design of forms and reports. So what you propose won’t work in a multi-user environment.

      • #692340

        Hans – exactly what I was thinking. I’ve spent several hours researching these properties, and it’s opened my eyes to some interesting possibilities for them, but the drawback is that the form / report must be in design view temporarily. At least that’s what they say… unless someone in Woody’s has another opinion. I was thinking that I may have to try SendKeys (ugghh!) to do what I want — it’s the only ‘printer’ that starts with ‘R’, so I may get away with it as a workaround. Wish there was a better way to code a button to aim at a specific printer. I think that Access 2002 may have a solution, but it will probably be 2010 before this company changes versions…

        Thanks again,

        Howard

        • #692549

          Sorry but changing the printer from code still requires you to open the report in design view in 2002.

    Viewing 1 reply thread
    Reply To: PrtDevMode Property to change printer for a form (2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: