• Draw Enries (2000)

    Author
    Topic
    #395804

    Our company is going to run a competition and the clients will get an entry for say every $1,000 they spend in the period. It is easy to determine the number of entries and use the INT function to set number of entries. What I cannot see at the moment is how to print the relevant number of entries. It was intended to use an Access Report to produce the entries that would then be cut to size and placed in a barrel. If any one could suggest a way of doing this it would be greatly appreciated. i.e have data e.g client xyz entries 3, client abc entries 1 etc etc.
    Many thanks Allan

    Viewing 1 reply thread
    Author
    Replies
    • #737487

      About the only way I can think of is to create a separate table. Call this new table tblCounter, and it has only a single field (call this field Counter, which is an integer). If you expect no client to have more than 50 entries (for example), then populate tblCounter with 50 records, with Counter being from 1-50.

      Then, create a query than includes both this new table and any other tables necessary to the the SumOfPurchases over the period. This will create a Cartesian join, which basically means that you will get 1 record for each customer for each of the 50 records in tblCounter. You then whittle this down to what you need by including a Where clause like this:
      Int(SumOfPurchases)<=Counter

      The

      • #737766

        Dear Mark, Many thanks for your prompt reply and this set me off in the right direction. Because I had already in the query the calculation of the number of entries, I created a table from the cartesion join and then ran a query with <=[entries] in the counter field. This was simple and works perfectly. many thanks again.
        Regards

        Allan

      • #737767

        Dear Mark, Many thanks for your prompt reply and this set me off in the right direction. Because I had already in the query the calculation of the number of entries, I created a table from the cartesion join and then ran a query with <=[entries] in the counter field. This was simple and works perfectly. many thanks again.
        Regards

        Allan

    • #737488

      About the only way I can think of is to create a separate table. Call this new table tblCounter, and it has only a single field (call this field Counter, which is an integer). If you expect no client to have more than 50 entries (for example), then populate tblCounter with 50 records, with Counter being from 1-50.

      Then, create a query than includes both this new table and any other tables necessary to the the SumOfPurchases over the period. This will create a Cartesian join, which basically means that you will get 1 record for each customer for each of the 50 records in tblCounter. You then whittle this down to what you need by including a Where clause like this:
      Int(SumOfPurchases)<=Counter

      The

    Viewing 1 reply thread
    Reply To: Draw Enries (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: