The only thing I modified was the control source and the field names. I replaced the old control with the new field names and everything worked fine, so I know it has nothing to do with that. Let me first explain the report a little clearer. I have 8 queries that each look for a different letter (qry1 looks for A, qry2 looks for B, etc.). In these queries there are only two fields, VehNum and VanSec (VanSec is the one that contains the letters). I then have 8 separate reports that are each based on a query. I have my main report based on a table that contains all of the Vehicle Numbers (data is in the field VanSec). The main report also contains the 8 checkboxes and the 8 subreports that are based off of the queries. The subreports are linked to the main report by the filed VehNum. The code for the checkboxes is as follows:
=IIf([Vehicle Number]=[qry1].Report![Vehicle Number],1)
Essentially what this says if the vehicle number in the subreport matches the vehicle number on the report, set the checkbox's control to 1 (in other words to a check mark). Initially I ran into a problem here because if the vehicle numbers did not match it meant that the subreport would not show up, therefore the checkbox was null. To fix this by adding a hidden text box that reads:
=IIf(IsError([Check1]),[Check1]="0",[Check1]="1"
I think this is where my recent problem lies. All of this is done 8 times for each check box, and then continued numerous times for each vehicle number. This was the code I was trying and the result was that absolutely nothing happens:
= SUM( IIf(IsError(IIf([VehNum]=[qry1].Report![VehNumber],1)),”0”,”1”) + IIf(IsError(IIf([VehNum]=[qry2].Report![Vehicle Num],1)),”0”,”1”) + IIf(IsError(IIf([VehNum]=[qry3].Report![VehNum],1)),”0”,”1”) + IIf(IsError(IIf([VehNum]=[qry4].Report![VehNum],1)),”0”,”1”) + IIf(IsError(IIf([VehNum]=[qry5].Report![VehNum],1)),”0”,”1”) + IIf(IsError(IIf([VehNum]=[qry6].Report![VehNum],1)),”0”,”1”) + IIf(IsError(IIf([VehNum]=[qry7].Report![VehNum],1)),”0”,”1”) + IIf(IsError(IIf([VehNum]=[qry8].Report![VehNum],1)),”0”,”1”))
I am just trying to Sum, and then I will battle with trying to find the average. I know this is all very confusing, and I do not blame you if you do not have to the time to evaluate it. Any advice that you would have would help me out so much!!!!!!!!!!
Jennpen1