Invalid Argument Problem

J

JohnB

Hi.

Can anyone throw any light on a problem Im having with an
Invalid Argument message? I don’t know what this means and
I don’t know for sure why its happening, although I have
one idea. Ill have to give lots of info so please bear
with me.

Im using Access 2002 on XP, networked and I use a Tab
Control form as my main Switchboard. Each Tab has its own
form and many forms have subforms.

The db has been working OK for some time but recently,
when the users were updating subform records, they started
getting a message to say that another user had modified
the same record and asking the user to decide on which to
keep. I posted about this and Marsh gave me some code to
put in a command button that would save the record before
the user made further changes using a form called up by
the command button. While working on this fix, the users
became aware that when trying to open a School record,
they got an Invalid Argument message. Curiously, when they
clicked on the messages OK button exactly 14 times, the
message would clear and the School record would open. The
School record is the same School selected in a combo in
the subform record that the users were working in, when
the other user message appears, although the users are
working on other fields in the subform. This makes me
think that the two occurrences are related in some way.

The Invalid Argument problem stopped users opening the
related school record and many other records and reports
where this School would normally appear.

Anyway, the only way I could get rid of the Invalid
Argument messages was to determine which School record was
affected, then delete the record completely and then
reinstate it, along with all of the related many side
records. I found that I could only do this once I had run
a Compact and Repair. Otherwise the Invalid Argument
message would appear when I tried to delete the record,
either in the form or directly in the table.

I though Id fixed it but then the users started updating
the same records in a different Subform that I had
forgotten to add Marshs code to. Again, they got the
message about another user updating the same record and
again found the Invalid Argument message appearing when
the tried to open the record for the School quoted on the
subform. This time, however, the user didn’t think they
had made changes other than directly on the subform, i.e.
they hadnt made a change to a text field then used the
command button to make further changes to the same table
using a different form. So Im not sure why they got the
other user message this time and whether or not the two
things are related. Even if they are, why would the fact
that Access thinks that two users are trying to update the
same record cause this Invalid Argument problem, which
seems like corruption to me.

Obviously Ill add Marshs code to these other subforms to
stop the other user message senario but Im still worried
that they are two separate issues. If so, Im baffled as to
how to fully fix the Invalid Argument problem.

Has anyone any idea whats going on here and how I might
indentlfy and solve the actual problem? Ive now had to
delete two School records and its really tedious having to
replace loads of data lost as a result.

Thanks for any help you can offer, JohnB
 
Top