CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    Join Date
    Nov 2005
    Posts
    36

    Re: Searching a recordset and returning TOTALS

    So the time has passed to modify any code... I had to push out my application as is.

    Here I come lots'o SQL statements.

    For future reference though, I would like to know if there is a way to do something like I asked above.

    To make it a little clearer.

    Table Format
    Software Yes No
    Outlook
    Office
    Internet Exp
    and so on


    Let's say we need to find out how many, out of 100 users, use these applications on an every day basis.

    Let's also say that we have a small form with a label saying something like "Please check the following applications that you use on an every day basis"
    4 CheckBoxes... for each app
    and a submit button.

    On submit, run a few checks to see which checkboxes have been checked off.
    Code:
    if check1.value = 1 then
         'find the record in software labeled Outlook and add 1 to the yes column
    myCheck1 = check1.caption
         'in my table, search through column 1 "Software" for myCheck1
         'when I find it, go to the "Yes" column and add 1 to it
         'I know you can use rs.fields("Yes") = rs.fields("Yes") + 1 ... tested and approved
    else
         'same as above only for the "No" column
    end if
    Then after making sure all 100 users had chosen their everday apps, I could make a small simple totals sheet
    This would be fairly simple, since I could just link my rs to an MSHFlexGrid or DataGrid... I would say MSFlexGrid too, but I'm not having any luck with that one.

  2. #17
    Join Date
    Nov 2005
    Posts
    36

    Re: Searching a recordset and returning TOTALS

    Anyone have any ideas? At least whether this is possible or not?

Page 2 of 2 FirstFirst 12

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