Program works in IDE, but not when running the EXE

HELP!!!

I have written a program using Borland Pascal Object Windows ver 7.
In the program I have used dialog boxes I have created using the resource
workshop.
Transfer buffers are used to send information to and from the application
and dialog box.

The program runs fine when run using the integrated devleopement
enviroment, but returns a message box saying : 'Application Error.    Error
code -1  ' when I run the EXE. The message box comes up a soon as I call
the dialog box.

Please send any help to my email address el...@it.new.iscorltd.co.za