Sorry Terry but I know nothing about SQL server
>Stev,
>I forgot to mention that the erro messagebox is from a SQL server message indicating "connection failed" SQL Server error 4060.
>The messagebox appears before the error handler in the vfp program is even aware that an error has occurred.
>I was wondering if there may be an API that would indicate the messagebox was there.
>
>When the mb appears it requires the user to click OK button [keyboard {enter}] and then the sql login window pops up requesting user interface OK or Cancel.
>
>I need to programmatically determine when the window is there.
>
>Any ideas?