Exception EoutofResources

My app gives me the message:

'Exception EoutofResources ... the parameter is incorrect'

when I attempt to run it. The odd thing is that if I view the form as
text and then run it, it works with no problems.
Any help gratefully received