using an Access Form checkbox with a mysql field which is 0/1

  • Thread starter armyofda12monkeys
  • Start date
A

armyofda12monkeys

I am connecting to a mysql database throuh Access 2003 (through newest
mysql ODBC driver).
In my form, I connect the checkbox to the '0/1' field (by setting that
field as the Control Source), it will show up correctly... if its 1, it
will be checked, if its 0, it will not.

However updating poses a problem. unchecking a checked box (1 in
database) will set the field to 0. but checking a unchecked checkbox
will NOT set it to be 1. i get this error after i try checking it and
leave the row to let it update:

"This record has been changed by another user since you started editing
it. If you save the record, you will overwrite the changes the other
user made.

Copying the changes to the clipboard will let you look at the values
the other user entered, and then paste your changes back in if you
decide to make changes. [options: Save Record greyed out, Copy to
Clipboard, Drop Changes]"

this file and mysql database is local on my machine, no one else is
using it so i am perplexed at the error. when i choose Copy to
Clipboard and paste that row in a text editor, it seems like it wants
to set that field to -1.

anyone have an idea?
 
A

Albert D.Kallal

Can you use a true/false field in place of a integer?

The odbc driver of the particular server in question should take care of
this.

So, I would

a) try a actually Boolean field, not a integer
b) ask in a MySql newsgroup about using the odbc driver with
true/false fields...
 
A

armyofda12monkeys

nah i have to keep database as is.
is there a boolean field in mysql? i thinkpeople just use Char(1) or
Int(1)
hmmmm i guess i can ask in a mysql board.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top