No linked tables found.
strTitle = “No back end”
strPrompt = “There are no linked tables in this database; “ _
& “please use the Back up Database command instead”
MsgBox strPrompt, vbExclamation + vbOKOnly, strTitle
GoTo ErrorHandlerExit
ContinueBackup:
Extract back end name and path from Connect property string.
strFullPath = Split(strBackEndDBNameAndPath, “\”, -1, _
vbTextCompare)
intUBound = UBound(strFullPath)
strBackEndDBName = strFullPath(intUBound)
strBackEndDBPath = Mid(strBackEndDBNameAndPath, 1, _
Len(strBackEndDBNameAndPath) - Len(strBackEndDBName))
Debug.Print “Database name: “ & strBackEndDBName
Debug.Print “Database path: “ & strBackEndDBPath
On Error Resume Next
Check whether back end path is valid.
Set sfld = fso.GetFolder(strBackEndDBPath)
If sfld Is Nothing Then
strTitle = “Invalid path”
strPrompt = strBackEndDBPath _
& “ is an invalid path; please re-link tables and try
again”
MsgBox strPrompt, vbOKOnly + vbExclamation, strTitle
GoTo ErrorHandlerExit
End If
If setup has not been done, copy zstblBackupInfo to calling database.
strCallingDb = CurrentDb.Name
strTable = “zstblBackupInfo”
Set tdfCalling = dbsCalling.TableDefs(strTable)
If tdfCalling Is Nothing Then
Debug.Print strTable & “ not found; about to copy it”
DoCmd.CopyObject destinationdatabase:=strCallingDb, _
newname:=strTable, _
sourceobjectType:=acTable, _
sourceobjectname:=strTable
Debug.Print “Copied “ & strTable
End If
Creating Access Add-ins 14