I use a connection statement indeed, but the problem is that you get a SQL server login error, which is a non-Ms Access error, and after that you get a SQL server login pop-up, also non-Ms Access! So you can't display a customized error message in Ms Access. Isn't there a way to avoid getting this SQL login error while testing if the server is online?