Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

number of print copies varies by value in Quantity field

Discussion in 'Information Technology' started by Lele, Jul 28, 2006.

  1. Lele

    Lele
    Expand Collapse
    Guest

    I need to print work tickets for our production people that reflect the
    number of items to be produced and help us track that we have produced and
    shipped all items on the order.
    For example if my order is for 3 pillows and 2 bedskirts, I need to produce
    5 work tickets. I have been using this great code written by Graham Mandeno
    and it works super. (see Below). I would like to refined the code as follows:

    First: I would like the 3 pillow tickets to show 1 of 3, 2 of 3, and 3 of 3.
    Of course the 2 bedskirts would show 1 of 2, 2 of 2 etc. for each item on
    the order.

    Second: I would also like to have each of the 5 tickets say 1 of 5 items on
    the order, 2 of 5 items on the order, etc. (this way the shipper is more
    likely not to miss a piece on the order.)

    Third, I produce draperies either as single panels or in pairs. If the UOM
    on the work order is pairs I need 2 copies of the work ticket produced for
    each pair - one for left and one for the right.

    Any help is greatly appreciated.

    Lele

    Dim iCopiesPrinted As Integer

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    If FormatCount = 1 Then iCopiesPrinted = 0
    iCopiesPrinted = iCopiesPrinted + 1
    If iCopiesPrinted < QTY Then Me.NextRecord = False
    End Sub

    Private Sub Report_Page()
    iCopiesPrinted = iCopiesPrinted - 1
    End Sub

    --
    Lele

    --
    Lele
     
  2. Loading...

    Similar Threads Forum Date
    Shabad Numbering System New to Sikhism Dec 1, 2015
    USA A Heart Attack And The Numbers Breaking News Aug 2, 2014
    Pacific Borneo: Sikhs small in number, strong in presence Breaking News Nov 11, 2013
    World Shrinking Numbers and Growing Persecution Threaten Sikhs and Hindus in Afghanistan Breaking News Nov 7, 2013
    SciTech Mammals pick offspring’s sex to maximize number of grandchildren, study shows Breaking News Jul 11, 2013

  3. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Fri, 14 Jul 2006 16:19:01 -0700, Lele
    <Lele@discussions.microsoft.com> wrote:

    >I need to print work tickets for our production people that reflect the
    >number of items to be produced and help us track that we have produced and
    >shipped all items on the order.
    >For example if my order is for 3 pillows and 2 bedskirts, I need to produce
    >5 work tickets. I have been using this great code written by Graham Mandeno
    >and it works super. (see Below). I would like to refined the code as follows:
    >
    >First: I would like the 3 pillow tickets to show 1 of 3, 2 of 3, and 3 of 3.
    > Of course the 2 bedskirts would show 1 of 2, 2 of 2 etc. for each item on
    >the order.
    >


    An auxiliary table is handy for this purpose. I routinely put a table
    named Num, with one Integer (or Long Integer) field N as its primary
    key. I originally created the table (I just import it now) in Excel
    with fill-down sequential, with numbers from 1 to 10000.

    Create a Query for your report with whatever tables you need; include
    the Num table with (initially) a Join from from the Quantity field to
    N. Then open the query in SQL view and edit the line

    INNER JOIN Num ON Num.N = yourtable.quantity

    to

    INNER JOIN Num ON Num.N <= yourtable.quantity

    This "non equi join" query will give you as many repeats as the value
    of quantity for each row. You can use N as the control source of the
    "1 of" textbox, and [quantity] as the control source of the "of 5"
    textbox.

    >Second: I would also like to have each of the 5 tickets say 1 of 5 items on
    >the order, 2 of 5 items on the order, etc. (this way the shipper is more
    >likely not to miss a piece on the order.)


    Just include the same textboxes on the shipping ticket report.

    >Third, I produce draperies either as single panels or in pairs. If the UOM
    >on the work order is pairs I need 2 copies of the work ticket produced for
    >each pair - one for left and one for the right.


    That will be a bit trickier - you'll need an IIF to identify which
    quantities are pairs.

    John W. Vinson[MVP]
     

Share This Page