Disable X on tab for a document

Is there a way to disable the “X” on a tab for a document?

I want to force the user to save and exit a document from a button in the form and not by using the “X” on the tab.

Subject: Disable X on tab for a document.

We wanted to do something similar on a dialog box, but couldn’t find a way to disable it either. Instead, we created a field called “Clicked” with values Yes (1) or No (2) and set it to Yes at the beginning of our code. If users click X we have code in the queryclose that stops them.

Sub Queryclose(Source As Notesuidocument, Continue As Variant)

If source.FieldGetText("Clicked") = "No" Then

	Messagebox "Please use the -Close Window- button to exit out of the Time Log Screen.",64,"Information"

	Continue = False

End If

End Sub

Subject: Disable X on tab for a document.

No.

It sounds like you have a set of events happening in your “Save and Exit” button. Why not move the code from the button to the QuerySave event. That way if they click on the X or (File > Close) the actions are performed as if they clicked on your button now.

Subject: RE: Disable X on tab for a document.

That may work… if not is there a way to disable the X that you may know Thanks

BB

Subject: RE: Disable X on tab for a document.

Rule #1 – Do not mess with the normal functionality of the user interface. The user should always have access to the normal methods of opening, saving and closing a document (CTRL+S, ESC->ENTER, File->Save); use special buttons only for special actions (like a one-click approval and so forth). If you need to run code every time a document is saved, that code belongs in the QuerySave event, not in a button.

Subject: Disable X on tab for a document.

Look here- I have laid out the code - also check the remainder of the thread.http://www-10.lotus.com/ldd/nd6forum.nsf/ShowMyTopicsAllFlatweb/2383ed43b777a7888525742400450408?OpenDocument