I'm having a little trouble i need some help with. i've done some searching and so far havent found any help but hey, i did find some good articles and code to read later
I have my FE being rolled out and installed on the users desktop but it seems that the first time thru i'm getting an error 3044 in this function that is in my relinking module. Its a commonly used function so i figured someone out there would have had the same problem And posted a solution but so far i haven't found it. in my mind, i could and have been wrong but the way this is wrote i shouldn't see any errors to the users. I added the second condition myself just trying to trap the 3044 but it still goes straight to the system error message. anyone have any ideas, what i may be doing wrong, a better way of checking for connection or a better way to trap it? My only solution at this point that has avoided the error is if i can go to the computer(not all users are at my location or state for that matter) and comment it out the first time or manually link it which seems like a pain to ask my users to do.
Code:
'***************************************
' Returns True if table can be located
'***************************************
Public Function CheckConn(TableName As String) As Boolean
''On Error Resume Next
Dim rs As DAO.Recordset
' Open linked table to see if connection information is correct.
Set rs = CurrentDb.OpenRecordset(TableName)
' If there's no error, return True
If Err.Number = 0 Then
CheckConn = True
ElseIf Err.Number = 3044 Then
CheckConn = False
Else
CheckConn = False
End If
rs.Close
Set rs = Nothing
End Function