Notice: Undefined offset: 2 in /home2/icentarb/public_html/icentar/classes/class.permissions.php on line 735
Sub LinkAllTblsinDir()
'-------------------------------------------------------------
Dim sTblNm As String, sPath As String, sFileNm
Dim DB As DAO.Database, Tbl As Tabledef
Dim ImeT As String, Prefix As String, Putanja As String
Dim fd As FileDialog, Fl As Integer
'-------------------------------------------------------------
Prefix = "dbf_"
Set DB = CurrentDb()
'Brisanje
For Each Tbl In DB.TableDefs
ImeT = Tbl.Name
If Left(ImeT, 4) = Prefix Then
DoCmd.DeleteObject acTable, ImeT
End If
Next Tbl
'Upis
Set fd = Application.FileDialog(msoFileDialogFilePicker)
With fd
.AllowMultiSelect = True
.Filters.Clear
.Filters.Add "Baze", "*.dbf", 1
.Show
End With
Putanja = fd.InitialFileName
For Each sFileNm In fd.SelectedItems
If Right(sFileNm, 3) = "dbf" Then
sFileNm = Mid(sFileNm, Len(Putanja) + 1)
sTblNm = Prefix & Left(sFile