if you're talking about the "X" button in the upper right corner of the
database window, you can set the form's Popup and Modal properties to Yes.
this will stop the user from directly closing the database window, or using
the visible menu and toolbar(s), while the form is open.
hi
a good methos i use to prevent unwanted closures is:
use the UnLoad event of the form. because it has a cancel variable, you can
test and decide youreself if to allow the closure or cancel it (cancel=1)
Good Luck