Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Sep 2006
    Posts
    166
    Thanks
    0
    Thanked 0 Times in 0 Posts

    pages to print (Access 2000)

    I want to enable the user to choose the number of the pages to print.Did somebody come accross this problem ? I know a command to print that is DoCmd.printout Copies:= n but is it possible for the user to enter the number of the copies on the form? Shall i use a special table for that purpose, or i could manage somehow to do it on the form ?

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: pages to print (Access 2000)

    So you just want to choose the numberof copies to print , not the number of pages to print?

    Yes you can do what you propose.

    It is a good idea to store the number of copies in a table somewhere, so that the user can change the default without having to look inside the code.

    You might have a table that holds settings like this, with just one record and a number of fields, or a separate record for each setting you want to store.

    You can then retrieve the value from that table with a lookup, and display it on the form. I would put it on the form so the user could change it on a case by case basis if they want, and so they were not surprised when multiple copies print.

    In the onload event of the form:
    Dim intcopies at integer
    intcopies = DLookup("[Invoicecopies]", "tblpreferences", "[Key]=1") or intcopies = NZ(DLookup("[Invoicecopies]", "tblpreferences", "[Key]=1") ,1)
    me.txtcopies = intcopies

    Then when you print you retrieve the value from the from and use it for the DoCmd.printout Copies:= n
    Regards
    John



  3. #3
    2 Star Lounger
    Join Date
    Sep 2006
    Posts
    166
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: pages to print (Access 2000)

    thank you, i will put it to use now

Posting Permissions

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