Agree with WGM. rst!CustId probably contains no value, not necessarily because the field has nulls, but because there's something wrong with the recordset code.
You could post the whole sub/function code and indicate which line is raising the error (implied that it is your DMax line, but not stated exactly) but a zipped copy of the db would be better if you can't find the cause of the problem.
If you post code, please use code tags (# button on posting toolbar).
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.