ok, i run it, but my app is freeze!!
1. i have made a module of the link you send me.
2. i (want) to run the follwing code
CODE
Private Sub import_tables_Click()
Dim RARCommandLine As String
Dim EktelesiRAR As String
Dim OnomaArxeiouRAR As String
Dim OnomaArxeiouMDB As String
OnomaArxeiouRAR = Me.txtFileToOpen
RARCommandLine = "c:\windows\rar.exe e -hpCharsetxx_MehKGyZM9ZnG " & OnomaArxeiouRAR
EktelesiRAR = Shell(RARCommandLine, vbHide)
Call ShellWait(RARCommandLine, vbHide)
'dimiourgia onomatos mdb
OnomaArxeiouMDB = Me.txtFileToOpen
OnomaArxeiouMDB = StrReverse(OnomaArxeiouMDB)
OnomaArxeiouMDB = Replace(OnomaArxeiouMDB, "rps", "bdm", , 1)
OnomaArxeiouMDB = StrReverse(OnomaArxeiouMDB)
'eisagogi pinakon
'On Error GoTo ErrHandler
Dim db As Database
Dim tbl As TableDef
Dim sPath As String
Dim sTblName As String
Dim sLinkedTblName As String
Dim fOpenedDB As Boolean
sPath = OnomaArxeiouMDB
sTblName = "tblergasies"
sLinkedTblName = "tblergasies_Link"
If ObjectExists("Table", sLinkedTblName) Then
DoCmd.DeleteObject acTable, sLinkedTblName
End If
Set db = CurrentDb()
fOpenedDB = True
Set tbl = db.CreateTableDef(sLinkedTblName, _
dbAttachSavePWD, sTblName, ";Database=" & sPath & _
";Pwd=MyPswd")
db.TableDefs.Append tbl
Exit Sub
Set tbl = Nothing
If (fOpenedDB) Then
db.Close
fOpenedDB = False
End If
End Sub
what am i doing here?
i have a rar compressed file with an mdb inside. (the rar file is secured)
i must 1st decompress the rar file, then read the mdb file and link the tables in my main app.
the code is working (if i run it in steps), but it must find the extracted mdb file, and it cant because the access cant wait for extraction first....
so, i must use something like those you show me, but i cant make it work..
any help?