I am creating a form for an ADP and for some reason it causes Access to blowup. I was wondering if someone has seen this, or could try to recreate this.
I have a field in my SQL Server database that is a bit data type. I have it connected to a check box on my form. Then I added a combobox (using the wizard) that finds a record based on the table's primary key. The find works fine but if I try to change the value in the check box I get a 'Access needs to close' error.
I nearly skipped this because I don't "ADP" however just in case....
1) Bits in SQL Server can be Null. Booleans in Access cannot. I have had MDBs blow when coming across a Null bit. One way round it - if your Bits don't need to be null - set them not null with a default of 0 (or 1 - whatever floats your boat).
2) Since this is an ADP it probably doesn't get all that upset with Null Bits. However - if you are linking the Bit to a checkbox then maybe the checkbox is what is getting upset. Have you tried setting it to tri-state (true, false and Null)?
Forgive me if this is just ever-so-noobie as far as ADPs are concerned.
I think you're spot on pootle_flump - the mismatch might occur because the Access checkbox doesn't like Null Bit field. Often this (default the Bit field to 0 or 1) will work (works well on a couple of test thingies I've got running in 2003, anyway)
When I read your response, Pootle Flump, I thought for sure you were right. But after trying several variations (Not Allow Nulls, Default to False, and setting checkbox to Triple State) nothing seems to work. Each time I move to a record and then change the checkbox I get the 'needs to close' error. I will start googling to try to find an answer.
If you do find something or think of something else please let me know. I use this type of form quite often so I will be trying to find an answer.
Are you able to replicate this behavior using a fresh adp on a different computer? I would try to rule out anything that may be caused by that specific access install or that specific adp before looking at the form itself.
Maybe try a new adp with just the relevant bits on the same machine first, then try that same adp on a differenct computer, then try creating a new adp on a different computer. If it still borks, post the bare-bones adp here with a DDL statement for your SQL table and we can dig in to it.