Question : Count in a Query

Yesterday I asked the question on how to count the total number in a field.  The answer I got was great ...see below.  But not every field has a defect count and are blank.  What should the formula look like then?

If each item *always* starts with DefectCount, then a space, then a number, try:

DSum("Val(Mid([DefectCount], InStrRev([DefectCount], "" "") + 1))", "[tblIspRcdAP25]")

Answer : Count in a Query

Try this instead
DSum("Val(Trim([DefectCount]))", "[tblIspRcdAP25]")

This does not expect a space, will remove it if it doe have one, and will use a 0 if no value is in the field.
Random Solutions  
 
programming4us programming4us