run-time error 3021

J

jukka

Hello

I get run-time error 3021 on some computers,
but most run ok. I have found no
reason for that.
("Run-time error '3021' No current record" )

I am using vb6 and access / ado.

Are there any known reasons for that?
Hotfixes? Certain environments ?
Any xp service packs that couse that?

thanks
Jukka
 
D

Di Cook

Hi Jukka,



I've just started to get this error message as well and I'm trying to do
something very simple - just delete a record. I get the problem on one
computer but not on the other - both systems are using Windows XP and Office
XP. I've copied the exact same FE and BE files to test it between both
computers.



To illustrate, I get the error using the code created by the button wizard
to delete a record:



Private Sub Command90_Click()

On Error GoTo Err_Command90_Click





DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70

DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70



Exit_Command90_Click:

Exit Sub



Err_Command90_Click:

MsgBox err.Description

Resume Exit_Command90_Click



End Sub



If I manually select the record and then press the DEL key I don't get an
error message on the "offending" computer.



Anyone else had this problem or got some suggestions?



Regards

Di



PS I do, of course, have a record on screen when trying to press Delete
button.
 
D

Di Cook

Just thought I'd mention that I had a further look on MS Knowledgebase and
found an article entitled:

Article ID : 885235
Description of the Access 2002 post-Service Pack 3 hotfix package -


It mentions "Run-time error '3021': No current record" and says this can
occur after installing SP3 but only when deleting the last record in
recordset. This error is happening, in my experience, in the middle of a
recordset. It actually deletes the record but gives this error message
afterwards.

Anyone else had to use this hotfix - it's not available to on MS website you
have to ask Tech Support to supply it??



Di
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top