More info:
Both update queries complete successfully, and in today's testing the
process to remove a course from the package works successfully the
first time and hangs when I remove a second course. This happens even
if I close the form after removing the first course, reopen the form
and try removing the second package.
When adding a course to the package list, the problem occurs on the
first attempt. After playing around with an exit sub statement, it
seems that the line giving me grief is the Me.Requery statement
immediately following the DoCmd.RunSQL statement.
Does anyone have any ideas on why this would give me problems?
Especially when considering the behaviour of the removal process, which
succeeds the first time but hangs each subsequent time?
Thanks,
Daniel
unhinged - 17 Aug 2006 06:29 GMT
Yet more info:
This problem seems to be related to MS knowledge base article Q225985,
which specifies that a transaction may be extant and needs to be
committed.
I am using DoCmd.RunSQL to perform the update query, which in Access
2000 defaults to using a transaction, so I need to know how to commit
the transaction that for some reason is not completing properly. I have
tried the RunSQL method with UseTransaction set to False, but this does
not prevent the application from hanging.
Thanks in advance,
Daniel
unhinged - 21 Aug 2006 01:45 GMT
Another instalment in our exciting series:
Today I again tried just setting the value of the foreign key field
(something which did not work initially, which is why I switched to the
SQL process). This time, I actually paid attention to the error message
I was getting: 3164 (field not updateable).
A bit of research on these newsgroups showed that I should also be
looking at the query which forms the RecordSource for my subform; this
seems to be the problem as the recordset from that query is not
updateable in datasheet view. It seems strange to me that if I do not
update the subform and close and then re-open it, the data has been
changed correctly, but I guess that's just one of those things.
So, advice to all encountering this error is to check that the query
you are using allows an update to take place. I am going to post a new
topic now that I have a better understanding of the problem.