Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Public Sub Init() 'Called by OPEN FORM event On Error GoTo Check_Err Dim rs As DAO.Recordset Set dbCurrent = CurrentDb() ' First try to connect using SQL Native Client driver Native_Fail = False FMRdsn = "LCOG_FMR_ODBC_NATIVE" Set rs = dbCurrent.OpenRecordset(FMRdsn, dbOpenDynaset, dbSeeChanges) 'If driver unavailable, generates error 3151 Set rs = Nothing 'close recordset Exit Sub Native_No: ' If native driver unavailable, try to connect using MDAC ODBC driver FMRdsn = "LCOG_FMR_MDAC_ODBC" Set rs = dbCurrent.OpenRecordset(FMRdsn, dbOpenDynaset, dbSeeChanges) 'If driver unavailable, generates error 3151 Set rs = Nothing 'close recordset Exit Sub Check_Err: Select Case Err.Number Case 3151 'Unable to connect using an ODBC driver If FMRdsn = "LCOG_FMR_ODBC_NATIVE" Then Native_Fail = True 'Native Client didn't work, try MDAC Resume Native_No ElseIf Native_Fail Then 'Both MDAC and SQL Native Client ODBC driver connections failed. MsgBox ("Cannot connect to LCOG SQL database, check ODBC drivers - switching to local database"), _ vbOKOnly + vbCritical, "Cannot connect to LCOG SQL database (Error #" & Err.Number & ")" FMRdsn = "local_FMR" End If Case Else MsgBox Err.Description & " (" & Err.Number & ")", vbOKOnly + vbCritical, "Error" If Not IsAdmin Then Application.Quit End Select Set rs = Nothing 'close recordset End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
how to predefine file name on Application.FileDialog(mso
|Storage and Retrieval of ISO-8601 Format Date/Timestamp Records in Access / SQL Server||10||65|
|Form performance table vs. query||27||67|
|MS ACCESS VBA FORMATTING||9||60|
Join the community of 500,000 technology professionals and ask your questions.