Experts, All of the fields following me. are txt fields in my form, based on which the vba runs off of. When I run the code, I get an error message.
dhrsleft = IIf((DMax(Me.hdev, Me.ddev) - Me.dev) > 0, (DMax(Me.hdev, Me.ddev) - Me.dev), 0)
I am trying to determine the maximum value between hdev & ddev and use that to calculate the variance between that and dev. For example:
if hdev = 10, ddev= 15 and dev= 10 then I want the dhrsleft = max(10,15)-10 = 5