When trying to use a table which is linked to our Buffalo location's (their internet is down today) access db, I get an error on the rst.open sql statement. The on error is not trapping this...what code can be written to catch this?
Private Function RetrieveLinkedCCCRST(ByVal strSQLString As String) As ADODB.Recordset
Dim rst As ADODB.Recordset
Dim strSQL As String
On Error GoTo Err_RetrieveLinkedCCCTableInventoryQuantity
strSQL = strSQLString
Set rst = New ADODB.Recordset
rst.ActiveConnection = CurrentProject.Connection
rst.CursorLocation = adUseClient
rst.Open strSQL
Set RetrieveLinkedCCCRST = rst
Exit_RetrieveLinkedCCCTableInventoryQuantity:
Exit Function
Err_RetrieveLinkedCCCTableInventoryQuantity:
MsgBox "Unable to link to the table!"
Resume Exit_RetrieveLinkedCCCTableInventoryQuantity
End Function
Private Function RetrieveLinkedCCCRST(ByVal strSQLString As String) As ADODB.Recordset
Dim rst As ADODB.Recordset
Dim strSQL As String
On Error GoTo Err_RetrieveLinkedCCCTableInventoryQuantity
strSQL = strSQLString
Set rst = New ADODB.Recordset
rst.ActiveConnection = CurrentProject.Connection
rst.CursorLocation = adUseClient
rst.Open strSQL
Set RetrieveLinkedCCCRST = rst
Exit_RetrieveLinkedCCCTableInventoryQuantity:
Exit Function
Err_RetrieveLinkedCCCTableInventoryQuantity:
MsgBox "Unable to link to the table!"
Resume Exit_RetrieveLinkedCCCTableInventoryQuantity
End Function