Hi:
When I searched the newsgroup for this problem, I saw two or three
instances of the question being asked, but it was never answered. Not
too promising, but here goes:
I have a form with four subforms, and bit of code that cycles through
the data in the subform (bound to a local temp table) and writes it to a
table on the server. This code has run at the client with no problems
for over a year.
Now,
in the past few weeks, they get an error 3022 (duplicate value in index)
on many
(but not all) instances of running this code. I have stepped through
the code and can verify that there are no duplicate records in the
system when the error occurs.
Testing:
- I can't reproduce the error on my stand-alone system
- I have not gotten the error when I logged in remotely to the client; I
tend to do this either early am or on weekends, when no one else is on
their system.
- I did get the error when I logged on remotely to another system (an
intermediate player in this client relationship); in this case it was
mid-day when their system was busy.
I run Access 2003; the client runs A2003 on some machines, A2002 or maybe
even A2000 on others.
I wonder whether this error has to do with stand-alone vs network, or
what? The prior cases I found in the archives also mentioned not
getting the error on a stand-alone machine but getting it when logging
into a network.
The code is below
Set rsSource = Forms!comps_frm !UtilitiesSub.F orm.RecordsetCl one
If rsSource.Record Count 0 Then
Set rsTarget = db.OpenRecordse t("select * from
[TestUnitUtiliti es for forms]", _
dbOpenDynaset, dbSeeChanges)
rsSource.MoveFi rst
Do Until rsSource.EOF
rsTarget.AddNew
rsTarget!TestUn itID = newID
rsTarget!Utilit yID = rsSource!Utilit yID
==>error 3022 here rsTarget.Update
rsSource.MoveNe xt
Loop
End If
Any ideas welcome!
When I searched the newsgroup for this problem, I saw two or three
instances of the question being asked, but it was never answered. Not
too promising, but here goes:
I have a form with four subforms, and bit of code that cycles through
the data in the subform (bound to a local temp table) and writes it to a
table on the server. This code has run at the client with no problems
for over a year.
Now,
in the past few weeks, they get an error 3022 (duplicate value in index)
on many
(but not all) instances of running this code. I have stepped through
the code and can verify that there are no duplicate records in the
system when the error occurs.
Testing:
- I can't reproduce the error on my stand-alone system
- I have not gotten the error when I logged in remotely to the client; I
tend to do this either early am or on weekends, when no one else is on
their system.
- I did get the error when I logged on remotely to another system (an
intermediate player in this client relationship); in this case it was
mid-day when their system was busy.
I run Access 2003; the client runs A2003 on some machines, A2002 or maybe
even A2000 on others.
I wonder whether this error has to do with stand-alone vs network, or
what? The prior cases I found in the archives also mentioned not
getting the error on a stand-alone machine but getting it when logging
into a network.
The code is below
Set rsSource = Forms!comps_frm !UtilitiesSub.F orm.RecordsetCl one
If rsSource.Record Count 0 Then
Set rsTarget = db.OpenRecordse t("select * from
[TestUnitUtiliti es for forms]", _
dbOpenDynaset, dbSeeChanges)
rsSource.MoveFi rst
Do Until rsSource.EOF
rsTarget.AddNew
rsTarget!TestUn itID = newID
rsTarget!Utilit yID = rsSource!Utilit yID
==>error 3022 here rsTarget.Update
rsSource.MoveNe xt
Loop
End If
Any ideas welcome!
Comment