Putting Me.Close() in the load event should close the form. I just tried a sample app and it worked as expected. Are you doing anything else in the form? Can you post your code?
>Hi, all,
>I've got a VB form that's similar to a browse window in FoxPro that just displays data. If there's no data that matches the criteria passed to the form, it needs to display a msg and close itself.
>
>I've got the data being queried in the form's LOAD method. If there's no data it displays a message and calls the form's close method - me.close().
>
>Only problem is that after the msg is dislayed, the forms stays active. Am I calling the wrong method to close the form, or is there a problem calling the close method from the load method?
>Thanks.
-----------------------------------------
Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.comwww.prenia.comWeblog: blogs.prenia.com/cathi