Thank you, Rimas Zilinskas and Jean-Pierre Pawlak. I now have spotted the problem. One place in the code calls the form 'theform' and another place simply 'form'. Unfortunately, it isn't just a matter of changing the word since different modules that this module refers to seem to use one or the other name. I'll see what I can do about it.