For my Remote Call Observation DB I have had the observers filling out observation forms for a week. I am now ready to start creating reports based on those observations.
The observation form consists of a few textboxes, combo boxes, and 33 questions that are in option groups with a Yes, No, or N/A checkbox. When the data is written to the table I have the question data going into columns named 1, 2, 3, 4, 5, etc... (more on the naming convention later.) The value written to the table is either a 1 for Yes, a 2 for No, or a 3 for N/A.
My form that I am using to generate the report allows the user to select various criteria, includeing the Site and Project they are observing calls for, and a date range for the report.
Once the user selects the criteria, the data meeting the criteria is written to a temp table. Then the fun begins.
I need to be able to count the number of Yes, No, and N/A answers in the temp table so that I can build some metrics for the report. So the reason that I named the columns 1, 2, 3, 4, 5, etc... is so I could use DCount abd loop through then like this:
intYES = 0
For i = 1 To 34
intYES = intYES + DCount(i, "[REPORT]", i = 3)
So through each loop, i is incremented until all 33 columns have been checked. I would do this once for Yes, once for No, and once for N/A..
Obviously, I am posting because it does not work. I do not get errors, but I am not getting the correct values either. I could blabber incoherently for a while longer but let me just cut to the chase.....