Write Conflict

Use the combo as I described in the second process to set the value for the UOM field, use a drop-down for the row source of the UOM control so you can change it to a different predefined value if you need to.
 
Its likely that the conflict is that you are trying to write to a bound control on a form.
See my article Write Conflict Errors (isladogs.co.uk) for other possible causes & solutions

I have just experienced a write conflict on a database I designed 3 years ago that sat on a shelf unused. I too was experiencing write conflicts due to null "bit" fields in an SQL database. Never come across this before, more recently my forms have been unbound. Thanks for the link which provides an excellent explanation and solved my problem (I also learned something which is always good :))
 
You're welcome
 
You're welcome
You are absolutely right Access really doesn't like null bit fields, my first attempt top solve it was in the linked table in Access, that too threw a write conflict. So I have to use an SQL update query in SQL Server Management Studio (SSMS) to set all nulls to 0 then I changed the design in SQL to set default to 0 and set allow nulls to no for good measure.
 
The only time you can have null bit values in Access is for unbound controls where a tristate option is available.
By comparison, most databases do allow null values

Although the Access development team made a poor decision when they excluded null values in bit fields over 30 years ago, we are stuck with that decision as changing it now would break lots of older databases.
 
That's why I got caught out returning to an old unreleased database that used bound forms, over the last few years I have designed all my forms unbound. A lot more work but a lot more interesting to design.
 
Its several orders of magnitude more work to use unbound forms and personally not an approach I normally use (with the sole exception of a settings form). I'm always surprised when I hear experienced developers using unbound forms by default as that negates many of the advantages Access provides in terms of RAD.
It would be interesting to hear your reasons though you may get a lot of flak from some of us if you do so.
 

Users who are viewing this thread

Back
Top Bottom