You can try to establish a connection to the server, and then if an error is thrown, do something, else... Like:
On Error Resume Next
Dim cn As ADODB.Connection
Set cn = New ADODB.Connection
cn.Open "Provider=SQLOLEDB;Data Source=ServerName;Initial Catalog=DatabaseName;UID=UserID;PWD=Password"
If Err <> 0 Then 'error was encountered trying to connect to database
Me.SynchButton.Enabled = True
cn.Close 'in case there was not an error. If it wasn't opened, this would throw an error, except for on error resume next, I think.
Did that help?
Look it up at: http://wrox.books24x7.com