Results 1 to 2 of 2
  1. #1
    kquackenbush is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2019
    Posts
    1

    Creating a sequence of numbers totaling a specified number

    Hi,

    Fairly new to Access, so will take all the help I can get on this one...

    I am trying to create a mailing form that I can enter a total number of mail pieces into that will divide the total number of pieces into bundles of 100 and create the correct amount of forms.

    E.g.
    Click image for larger version. 

Name:	mailform.jpg 
Views:	12 
Size:	13.4 KB 
ID:	38224
    If there are 587 pieces of mail, there will be a total of 6 bundles (5 bundles of 100, 1 loose bundle of 87).

    1) How can I create a sequence that would equal the total number of bundles, in this example 6, to go in the field highlighted by the red box, so that it creates 6 total pages when I go to print?
    i.e. 1 of 6, 2 of 6, 3 of 6, etc.


    2) I also need to display how many total pieces are in each of the bundles. How can I display bundles 1-5 with 100 mail pieces and bundle 6 with the remaining 87?

    Thanks!

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,811
    Wondering if this is more related to the reports forum rather than forms because running calculations are easier in reports. Regardless, you could use the Mod function, as in
    587 Mod 100 to return the remainder (87), and round down 587/100 to get 5 bundles: Int(587/100) = 5
    Not enough info to say how to get those values in to what.
    Last edited by Micron; 04-26-2019 at 03:07 PM. Reason: clarification
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 12-22-2016, 12:54 PM
  2. Replies: 3
    Last Post: 01-23-2014, 01:54 PM
  3. Adding numbers in sequence
    By howlettb in forum Access
    Replies: 6
    Last Post: 12-31-2013, 02:30 PM
  4. Find First number in sequence of numbers
    By losstww in forum Queries
    Replies: 4
    Last Post: 11-16-2012, 02:44 PM
  5. Reverse Sequence of Numbers
    By OpsO in forum Queries
    Replies: 1
    Last Post: 08-12-2010, 06:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums