Access 2003 runtime error

G

Guest

I know absolutely nothing about Access, but get to support it. I have a
client that was just upgraded to Access 2003. He has a database that he is
getting a runtime error on all of a sudden. It happens after the delete
confirm event. It says runtime error 2424 - the expression you entered had a
field control or property name that the database cannot find. It worked just
fine in 2002 and they said no changes had been made to it. Any ideas?
 
A

Alex Dybenko

Hi,
I think you have to look at code in order to see what it wrong there...
normally both access versions you mention are compatible, but could be some
reference issues, say to Word or Excel, and this can break application.
 
G

Guest

I asked the client and he said this: It looks like what is happening is that
the record is being deleted before it use to be. The record is valid in the
OnDelete event but is not invalid in the BeforeConfirmDelete event and in the
AfterConfirmDelete event.
 
A

Alex Dybenko

Hmm, then it is strange, because both BeforeConfirmDelete and
AfterConfirmDelete occure before Delete event. can you post your code from
these events here?
 
G

Guest

I have since changed the code. I used blobal variables to store my needed
information when the Delete event fired and then used them in the
AfterDeleteConfirm event go get around the problem.

Before, I was using the value of a check box on the subform where the record
was being deleted. The value of the check box became invalid on the
AfterdeleteConfirm event. The code was similiar to:

if cboPointsAssigned = True then
Do something
end if

I also put some message box displays is the Delete, BeforeDeleteConfirm and
the AfterDeleteConfirmEvent and the events fired in the following order:
Delete
BeforeDeleteConfirm
AfterDeleteConfirm

I do not know if this was the order they fired before the upgrade. If looks
like the record is now becoming invalid before it should.

If you would like to contact me via the phone, my number is (502)627-4192.

Thanks,
Tony
 
A

Alex Dybenko

Hi Tony,
yes, of course you right, delete occurs before *confirm events,sorry,
messed this with other control.
Anyway - great that you found a workaround

Alex
 
G

Guest

Why did this change. I sould not have had to find a work around. How can I
be assured this work around will work in the next version? Will this problem
be fixed?
 
A

Alex Dybenko

Well, this i dont know, and not sure that somebody can tell you.
also depends on your code...
 

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