You have two DCount()s in the "CalcSN" column in the query. I broke them out into separate columns - this is what the result was
Then I changed the CalcSN formula - this is the result:
I then added two more rows for Dept/Disc = OHS and DocTypes = POL
This is the result
If this is the results you are looking for, the formula I used is
Code:
CalcSN: DCount("[DeptDisc]","TblDocumentNumberGenerator","[DeptDisc] = '" & [DeptDisc] & "' and [DocTypes] = '" & [DocTypes] & "' AND [M_Id] <= " & [M_Id])
NOTE: I deleted the slash and the spaces in the table name.
[DeptDisc] instead of [Dept/Disc]
TblDocumentNumberGenerator instead of TblDocument Number Generator.
Object names should be only letters and numbers (and the underscore)
Do not use spaces, punctuation or special characters in object names.
Edit: Forgot to add "Welcome to the forum".