Results 1 to 5 of 5
  1. #1
    Lounger
    Join Date
    Oct 2002
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PrtDevMode Property to change printer for a form (2000)

    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

  2. #2
    3 Star Lounger
    Join Date
    Jun 2001
    Location
    Maidstone, Kent, England
    Posts
    398
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: PrtDevMode Property to change printer for a form (2000)

    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

    <img src=/S/2cents.gif border=0 alt=2cents width=15 height=15>

    Peter

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: PrtDevMode Property to change printer for a form (2000)

    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.

  4. #4
    Lounger
    Join Date
    Oct 2002
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: PrtDevMode Property to change printer for a form (2000)

    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

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: PrtDevMode Property to change printer for a form (2000)

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •