Hi:
You can have some code which runs on startup of database to do the
following. Click Tools | Startup and if you have a Startup form run some
code in this forms Form_Open event in VBA.
I assume you have some linked tables in your front end database and these
linked tables will not open if back end connection is invalid or server is
down. Let us assume you have a linked table called "tblClients".
'---- CODE ON STARTUP FORM FORM_OPEN EVENT -----------------
Dim db as DAO.Database
Dim rs as DAO.Recordset
Set db = CurrentDB()
On error resume next
Err.Number = 0
Set rs = db.OpenRecordSet("Select * from tblClients",dbOpenSnapshot)
If Err.Number <> 0 then
Msgbox "Sorry the server is down",vbInformation
Exit Sub
End if
On error goto 0
rs.Close
Set rs = nothing
db.Close
Set db = Nothing
'----------- End Code ------------------
The code tries to open a linked table - if it fails it gives a message.
Regards,
Naresh Nichani
Microsoft Access MVP