Cliff67
Registered User.
- Local time
- Today, 03:30
- Joined
- Oct 16, 2018
- Messages
- 177
Hi All
I've got a BE db for my front end, I have a splash screen that just shows the db name and welcome message, times out and opens a switchboard.
the problem I'm having is that even though I have specified the linked table location as \\server\foldername\subfoldername\BEname.accdb when run an runtime from a different machine (using the correct version of Runtime) that the tables are not found, and access does not open.
this is also true for the full version of Access I'm using to develop the front end
I have inserted a function to test for linked table as below
Private Function CheckLink(strTable As String) As Boolean
Dim varRet As Variant
On Error Resume Next
' Check for failure. If can't determine the name of
' the first field in the table, the links must be bad.
varRet = CurrentDb.TableDefs(strTable).Fields(0).Name
If Err <> 0 Then
CheckLink = False
Else
CheckLink = True
End If
End Function
after this function is run I get the db directory (based on the FE directory which is local)
Private Function GetDBDir() As String
On Error GoTo GetDBDirErr
Dim dbCurrent As Database
Dim strDbName As String
Set dbCurrent = CurrentDb
strDbName = dbCurrent.Name
Do While Right$(strDbName, 1) <> ""
strDbName = Left$(strDbName, Len(strDbName) - 1)
'MsgBox strDbName
Loop
GetDBDir = UCase$(strDbName)
On Error GoTo 0
Exit Function
GetDBDirErr:
strSEM = dfSEM(Err.Number, Err.Description, "GetDBDir", "GetDBDirErr")
MsgBox strSEM, vbInformation, "Technical Support and Repairs Database"
Err.Clear
'this is safe error handling
Exit Function
End Function
I then verify the link and call a common dialog box (contained within a module of common dialog features.
the db has been complied and compacted etc, however, it doesn't get that far and just closes Access both full version and runtime.
Any suggestions whats going on here
many thanks in advance
I've got a BE db for my front end, I have a splash screen that just shows the db name and welcome message, times out and opens a switchboard.
the problem I'm having is that even though I have specified the linked table location as \\server\foldername\subfoldername\BEname.accdb when run an runtime from a different machine (using the correct version of Runtime) that the tables are not found, and access does not open.
this is also true for the full version of Access I'm using to develop the front end
I have inserted a function to test for linked table as below
Private Function CheckLink(strTable As String) As Boolean
Dim varRet As Variant
On Error Resume Next
' Check for failure. If can't determine the name of
' the first field in the table, the links must be bad.
varRet = CurrentDb.TableDefs(strTable).Fields(0).Name
If Err <> 0 Then
CheckLink = False
Else
CheckLink = True
End If
End Function
after this function is run I get the db directory (based on the FE directory which is local)
Private Function GetDBDir() As String
On Error GoTo GetDBDirErr
Dim dbCurrent As Database
Dim strDbName As String
Set dbCurrent = CurrentDb
strDbName = dbCurrent.Name
Do While Right$(strDbName, 1) <> ""
strDbName = Left$(strDbName, Len(strDbName) - 1)
'MsgBox strDbName
Loop
GetDBDir = UCase$(strDbName)
On Error GoTo 0
Exit Function
GetDBDirErr:
strSEM = dfSEM(Err.Number, Err.Description, "GetDBDir", "GetDBDirErr")
MsgBox strSEM, vbInformation, "Technical Support and Repairs Database"
Err.Clear
'this is safe error handling
Exit Function
End Function
I then verify the link and call a common dialog box (contained within a module of common dialog features.
the db has been complied and compacted etc, however, it doesn't get that far and just closes Access both full version and runtime.
Any suggestions whats going on here
many thanks in advance