Ok, the following line will work as a SQL filter:


intBoxTotalMis = DSum("[mis]", "Used", "[BoxCode] = " & strQuote & strBoxCode & strQuote

However, the following line will not:

intBoxTotalMis = DSum("[mis]", "Used", "[BoxCode] = " & strQuote & strBoxCode & strQuote And "[LineCode] = " & strQuote & strFilterLine & strQuote)

When I try to run the program, it gets to this line and gives me a Run-time error '13' message stating "Type mismatch". Can anyone tell me the proper syntax to make it work?

Thanks,
ern