chirpyform
Programmer
Hi
I have a major problem with access 2000. I have a function that imports my data from another access 2000 database. The problem is that after all the data has been imported my indexes in the tables are messed up. This means that when I create a new record the identifiant created automatically, say 455 is given when really it should be 601, giving an error that the creation would give an index already used.
The code used for the import is the following :
If RecSetImport.RecordCount <> 0 Then
Var = RecSetImport.GetRows(RecSetImport.RecordCount)
NbCol = UBound(Var, 1) + 1
NbLigne = UBound(Var, 2) + 1
Cpt1 = 0
Cpt2 = 0
While Cpt1 < NbLigne
Recset.AddNew
While Cpt2 < NbCol
Recset.Fields(Cpt2) = Var(Cpt2, Cpt1)
Cpt2 = Cpt2 + 1
Wend
Recset.Update
Cpt1 = Cpt1 + 1
Cpt2 = 0
Wend
End If
If anyone has had the same problem or any ideas on how to get passed I would be grateful
Chris
I have a major problem with access 2000. I have a function that imports my data from another access 2000 database. The problem is that after all the data has been imported my indexes in the tables are messed up. This means that when I create a new record the identifiant created automatically, say 455 is given when really it should be 601, giving an error that the creation would give an index already used.
The code used for the import is the following :
If RecSetImport.RecordCount <> 0 Then
Var = RecSetImport.GetRows(RecSetImport.RecordCount)
NbCol = UBound(Var, 1) + 1
NbLigne = UBound(Var, 2) + 1
Cpt1 = 0
Cpt2 = 0
While Cpt1 < NbLigne
Recset.AddNew
While Cpt2 < NbCol
Recset.Fields(Cpt2) = Var(Cpt2, Cpt1)
Cpt2 = Cpt2 + 1
Wend
Recset.Update
Cpt1 = Cpt1 + 1
Cpt2 = 0
Wend
End If
If anyone has had the same problem or any ideas on how to get passed I would be grateful
Chris