Hi Guys
I am having problems with this Dcount
Code:
DPlatePerCentCheck = Nz(DCount("TestName", "tblTestsResults", "PartNumberID=" & Me.PartNumberID & "and ProductionOrderNumber='" & Me.PONumber & "'" & "And TestName='Plate Thickness (Microns)'" & "And Area='KDM'" & "And Archived = False"), 0)
the above Dcount works really well it counts the "testName" as expected, for only the area "KDM" but what I cant seem to do is this
Code:
DPlatePerCentCheck = Nz(DCount("TestName", "tblTestsResults", "PartNumberID=" & Me.PartNumberID & "and ProductionOrderNumber='" & Me.PONumber & "'" & "And TestName='Plate Thickness (Microns)'" & "And Area='KDM'" & "Or Area='Plating'" & "And Archived = False"), 0)
what I need to do is count the testname "Plate Thickness (Microns)" if there are values for KDM or Plating
when I run this the value of DPlatePerCentCheck is counting the tests for both the KDM and Plating areas even if the partnumber has only got tests recorded for "KDM" and like wise if the partnumber has only got test results for the "Plating" area
each partnumber id goes through many processes or "areas" in the factory so I am trying to just return the values for the two "KDM" or "Plating" and ignor the reset
not all part numbers go through every area which I why I thought about using the "OR"
any help would be fantastic,
Hope this makes sense
Steve