I've come up with this part of code to import from a dbase table and it will not work I don't think it's the code but... could you check if the following is ok.
here's the error Access97 give me:
**********************************
Error 3170
Couldn't find installable ISAM
**********************************
and here's the code:
the bug line is shown with the "" => ""
**********************************
Private Sub Commande25_Click()
Dim dbs As Database
Dim rst, rstbase, rstlig As Recordset
Dim entdemande As Integer
Dim intx As Integer
Dim nombre, NbFerme1e As Long
Dim Répertoire, nomexe As String
Dim a As String
Set dbs = CurrentDb()
Set rstbase = dbs.OpenRecordset("Table décret"
Set rst = dbs.OpenRecordset("Table1", dbReadOnly)
rstbase.MoveFirst
Do Until rstbase.EOF()
rst.FindFirst "[No de décret] = '" & rstbase.Décret & "'"
' créé a juste pour voir le no de décret en débug
a = rst![no de décret]
If rst.NoMatch = False Then
If Not IsNull(rst![Répertoire]) Then
If fExistTable("lig_cmpt" Then
DoCmd.DeleteObject acTable, "lig_cmpt"
End If
=> DoCmd.TransferDatabase acLink, "dBase IV", _
=> rst!Répertoire,acTable, "lig_cmpt.dbf",
=> _"lig_cmpt", False
Set rstlig = dbs.OpenRecordset("NbRécl1e Suite",
dbReadOnly)
nombre = 0
nombre = rstlig!nombre
rstlig.Close
Set rstlig = dbs.OpenRecordset("NbFermé1eAnalyse
Suite", dbReadOnly)
NbFerme1e = 0
NbFerme1e = rstlig!nombre
rstlig.Close
rstbase.Edit
rstbase![NbRécl1e] = nombre
rstbase![NbRécl1eFerme] = NbFerme1e
rstbase.Update
End If
End If
rstbase.MoveNext
Loop
rstbase.Close
rst.Close
Set dbs = Nothing
DoCmd.OpenReport "Statistique", acPreview
End Sub
**********************************
Help =(
here's the error Access97 give me:
**********************************
Error 3170
Couldn't find installable ISAM
**********************************
and here's the code:
the bug line is shown with the "" => ""
**********************************
Private Sub Commande25_Click()
Dim dbs As Database
Dim rst, rstbase, rstlig As Recordset
Dim entdemande As Integer
Dim intx As Integer
Dim nombre, NbFerme1e As Long
Dim Répertoire, nomexe As String
Dim a As String
Set dbs = CurrentDb()
Set rstbase = dbs.OpenRecordset("Table décret"
Set rst = dbs.OpenRecordset("Table1", dbReadOnly)
rstbase.MoveFirst
Do Until rstbase.EOF()
rst.FindFirst "[No de décret] = '" & rstbase.Décret & "'"
' créé a juste pour voir le no de décret en débug
a = rst![no de décret]
If rst.NoMatch = False Then
If Not IsNull(rst![Répertoire]) Then
If fExistTable("lig_cmpt" Then
DoCmd.DeleteObject acTable, "lig_cmpt"
End If
=> DoCmd.TransferDatabase acLink, "dBase IV", _
=> rst!Répertoire,acTable, "lig_cmpt.dbf",
=> _"lig_cmpt", False
Set rstlig = dbs.OpenRecordset("NbRécl1e Suite",
dbReadOnly)
nombre = 0
nombre = rstlig!nombre
rstlig.Close
Set rstlig = dbs.OpenRecordset("NbFermé1eAnalyse
Suite", dbReadOnly)
NbFerme1e = 0
NbFerme1e = rstlig!nombre
rstlig.Close
rstbase.Edit
rstbase![NbRécl1e] = nombre
rstbase![NbRécl1eFerme] = NbFerme1e
rstbase.Update
End If
End If
rstbase.MoveNext
Loop
rstbase.Close
rst.Close
Set dbs = Nothing
DoCmd.OpenReport "Statistique", acPreview
End Sub
**********************************
Help =(