Hi All,
I am sorry for changing the post again and again but I want to pin point the error so that anybody helping me would have the correct information. Sorry and Thanks.
I have to load the form based on whether a condition is met or not. If its not met then I just display an error message and I need to close the form.
I tried thisXDocument.View.Window.Close(true); and it didn't work. It doesn't bomb out either. It then displays the form.
All this checking part is in the form_load. Is it possible that since the condition checking is in the form_load the form will be displayed anyhow? If thats the case then what do I do in case I have to display a form only in case a condition is met?
I have already tried thisApplication.Quit(true); or stuff like thisXDocument.Save(); thisXDocument.Submit(); thinking that it would automatically close the form since there would be no change in the form and thus nothing new to save but still the form opens.
Any help would be greatly appreciated.
Thanks in advance
Sumeet