Form button only displays OK message

I put a button on a form’s toolbar to do some calculations but whatever I put in the code, it only shows a blank screen and an OK button in it.
Again, there is no difference depending on the code behind it. It doesn’t do even the simplest things.
Any ideas?