CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2007
    Posts
    51

    Assigning values to a category for statistical analysis

    I'm using VB.NET 2003. On one form, the user enters data via radiobuttons and checkboxes. They also have the option of assigning each group of radiobuttons or checkboxes to a various scoring category (1-8). The idea is that points are assigned based upon which checkbox or radiobutton is selected. The points are added up for a total score within that category at a later point in time. Since the user can determine which category the points are assigned to, is there a way for VB.NET to simply add up all of the values that have been assigned to a particular scoring category?

  2. #2
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    Re: Assigning values to a category for statistical analysis

    Yes there is. By writing code for it.

  3. #3
    Join Date
    Jan 2007
    Posts
    51

    Re: Assigning values to a category for statistical analysis

    Thanks. Very helpful.

    My problem is that I won't know which points should be assigned to which category until the user makes their selections. I'm trying to figure out the best way to facilitate this. I was thinking of setting up 8 dynamic arrays. Is there an array function that allows the dynamic array to take all of the variables contained within it and add them up...without knowing before hand what variables will be in a particular array?

  4. #4
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    Re: Assigning values to a category for statistical analysis

    For example you have 4 options for each category. Now User select number 1 for first, number 3 for 2nd question, etc then you have a button Submit on your form. In the submit button's click event handler, you can do the calculation using simple if or Select Case statements. Show us what have you written so far?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured