• Access 2003: Check boxes and tally

    Author
    Topic
    #475028

    Wow! It’s been years since I have been on this site. I am happy to report I am building Access Databases again….

    This is more of a design quuestion…

    Access 2003 (the client still has not upgraded)

    I want to build a FORM where there will be 10 checkboxes. These checkboxes are actually numerical values. 14-10-4-4-8-2 etc

    One or ALL can be checked.

    At the bottom of the form, I want to tally based on the Checkbox value…

    Whats the best way to go about it.

    I think I want to place a checkbox and then a FieldBox next to it so that the user can see what points were assigned (for instant gratification). And then have that total at the bottom.

    I would need those values to be saved somewhere so I can use it for reports.

    Thanks and keep up the good work…..

    Viewing 4 reply threads
    Author
    Replies
    • #1268764

      C1fer,

      Attached is an example form which will do what you want. Of course I’m sure it isn’t the most efficient code as I was aiming at functionality vs efficiency. You’ll also want to tie some of the fields to your database but this does give you the conceptual framework to get it going. Hit Alt+F11 to check out the code.:cheers:

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

      • #1269042

        That was awesome. Thanks for the reply. While waiting, I actually searched for older POSTS that I have done and found the answer. Seems I asked a similar question before.

        In any case I ended up using the same codes as you, but I did pick up the new SubTotal code you submitted so THANK YOU

    • #1269044

      Here is another quick one:
      I want to award 10 points for every $100 sold

      BOX1: enter amount (over 100)
      Box2: Box1/100 * 10

      ie: $4,689 = 46 * 10 = 460 Points

      • #1269065

        I quick thought:

        I wanted to write code to say:

        If Box2 = =10000 then Box1(left (3) * 100 (ie… 15984 = 1590 Points)

        I have already created 3 Update queries that I can run and give me the numbers, but its clunky….

        Thanks

    • #1269179

      C1fer,

      Why not just Int(clng(Box1)*.1) ?

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

      • #1270020

        Thanks RG:

        That works but I need to round it off.

        I need to award 10 points for every 100.

        756 gives me 7 x 10 = 70 points

        but 8,967 is giving me 896 instead of 890 points

    • #1270330

      In that case: Round(clng(Box1)*.1,0)

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • #1270333

      In that case: FLOOR(clng(Box1)*.1,10) or Int(clng(Box1)*.01)*10

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    Viewing 4 reply threads
    Reply To: Access 2003: Check boxes and tally

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: