• pages to print (Access 2000)

    Author
    Topic
    #435970

    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 ?

    Viewing 0 reply threads
    Author
    Replies
    • #1032178

      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

    Viewing 0 reply threads
    Reply To: pages to print (Access 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: