The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
		
			|  | 
			
		
			|  | 
				
					| 7.5.2 OnCloseQuery event not firing  Posted: 13 May 10 2:52 PM
 |  
					| After recently upgrading from 7.2 to 7.5.2, I have found that the OnCloseQuery event is not firing on the System:Insert New Ticket form when it is cancelled (Cancel button or red X).  It fires properly if the OK button is clicked.  It was working properly before the upgrade. 
 Any ideas?
 
 Thanks for any help anyone can provide.
 
 Leon
 |  
					|  |  | 
			|  | 
				
					| Re: 7.5.2 OnCloseQuery event not firing  Posted: 13 May 10 2:59 PM
 |  
					| I'm on 7.22 and firing an AXFormValidate still runs me through the code in the OK button, for example....even If I set AXFormValidate = False. 
 Here's what I do:
 
 1. Create a Global Variable
 
 Dim OKtoCloseForm
 
 2. AXFormValidate form event handler script:
 
 IF my conditions suk then
 
 AXFormValidate = False
 OKtoCloseForm = False
 
 Else
 AXFormValidate = True  ' everything coming up roses.
 OKtoCloseForm = True
 
 End If
 
 then in my Button onclick event script:
 
 Sub cmdOKClick
 
 IF OKtoCloseForm then
 'run final code prior to closing form
 
 else
 MsgBox "Dear User, you messed up....."
 
 End IF
 
 End Sub
 
 If you have an AXFormCloseQuery I do the same sorts of stuff.....am pretty sure I still do an AXFormValidate...
 
 
 
 |  
					|  |  | 
			|  | 
				
					| Re: 7.5.2 OnCloseQuery event not firing  Posted: 13 May 10 3:13 PM
 |  
					| My validation is working properly when I click the OK button.  The problem arises if the user decides to cancel without saving their new ticket.  I want to pop up a confirmation box asking if they really want to cancel, and also other possible processing depending on what they might have done before deciding to cancel.  I am doing this in the OnCloseQuery event and checking for ModalResult <> mrOK.  This code is no longer being called. |  
					|  |  | 
			|  | 
				
					| Re: 7.5.2 OnCloseQuery event not firing  Posted: 14 May 10 10:31 AM
 |  
					| Another thing that is happening is in the OnClose event, I check 
 If ModalReult <> mrOK
 ...
 End If
 
 but even when I close by clicking OK (which sets ModalResult to mrOK), it still runs the code that should be skipped in the If block
   
 Leon
 |  
					|  |  | 
			|  | 
				
					| Re: 7.5.2 OnCloseQuery event not firing  Posted: 17 May 10 1:01 PM
 |  
					| I am having the same issue.  The function seems to fire when the "Insert New Ticket" is called by one of our custom forms.  But when running the form on its own (Insert -> Ticket...) the routine doesn't fire at all.  Is anyone else having this issue? Leon, any advice at this point? |  
					|  |  | 
			|  |