Solved A Really Simple Question

Why would you have multiple forms bound to UserOptions open at the same time? And in update mode no less?

When you are writing a complicated procedure inside a transaction and it requires updates to multiple tables, you need to be conscious of the deadly embrace scenario. Where App1 locks tbl1, tbl2, then tbl3. But App2 locks tbl2, then tbl3, then tbl1. You need to think about this when writing your code so you always lock the tables in the same order to prevent the conflict.
Just trying to close the loop on some of the comments...
I think I updated my comment after your comment --- as I did not have them open at the same time. Indeed that would be a little bit crazy -- ha. I think the issue I've had is probably changing data on the form that is open - perhaps without saving it - and then there is a Write Conflict - that kind of thing - but - I'm not even sure - it's been a long time since running into that scenario. Anyway - totally agree with your point!!
 
Over the years, both in my own practice and in reading and answering hundreds of questions on various Access forums, I have formulated an Axiom about the Writing of Code.

Do it for your own amusement or do it to learn something new.

Do it because you want to see if you can actually balance the elephant on the head of the pin.

Do it to impress your drinking buddies and to gain bragging rights as a coder.

There are lots of reasons, large and small, to write non-mandatory code such as in unbound forms.

If you can't get the job done with a bound form, of course, it's really great that unbound forms are available as an option.

However, in none of those reasons is there anything heroic about being able to write wads of code to do something that can more easily, quickly or safely be done without that wad of code.
 
@Pat Hartman
I'm sorry, but that sounds a lot like a golden hammer, the one size fits all mentality. Forms can be bound or unbound in Access, so that is "THE Access way", by definition.
 

Users who are viewing this thread

Back
Top Bottom