Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing from dbase

Status
Not open for further replies.

Bigpapou

Programmer
May 23, 2001
41
CA
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 =(
 
This looks like a message generated by a wrong ODBC installation, I think. Suggest you check in the Windows Control Panel, ODBC settings.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top