checkbox not working after moving access to sql server tables (1 Viewer)

hfs

Registered User.
Local time
Yesterday, 20:02
Joined
Aug 7, 2013
Messages
47
i just moved my access databaseto sql server ,but the check boxes are not working any more in access and the values of sql server linked table field is showing up as -1 and 0.How can i enable my check box field on form?
Any Idea?
 

hfs

Registered User.
Local time
Yesterday, 20:02
Joined
Aug 7, 2013
Messages
47
?????????????????????????
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 20:02
Joined
Aug 30, 2003
Messages
36,125
I moved this thread to the SQL Server forum. Access stores a Yes/No field as -1/0. In SQL Server it would be a Bit field, but stored as 1/0. I use SQL Server most of the time, and don't have a problem with a checkbox bound to a Bit field working correctly. Can you confirm the data type, and that the checkbox is bound to the field? There's also this:

http://allenbrowne.com/NoYesNo.html
 

hfs

Registered User.
Local time
Yesterday, 20:02
Joined
Aug 7, 2013
Messages
47
Hey,
Thanks for replying my post!

I have a sub form which contains the checkbox,everytime the form loads the user should be able to check/uncheck the checkbox! checkbox is a field coming form table and is updated after the user check or uncheck,the same check box from the same table on another form is working fine ..its just this subform ,that the check box is not working.i have matched all properties etc ....but i have attached snapshots for you to review..
 

Attachments

  • 1.jpg
    1.jpg
    99.6 KB · Views: 480
  • 2.JPG
    2.JPG
    54.2 KB · Views: 372
  • 3.jpg
    3.jpg
    73.7 KB · Views: 402
  • 4.jpg
    4.jpg
    100.4 KB · Views: 421
  • 5.JPG
    5.JPG
    62.3 KB · Views: 418
Last edited:

hfs

Registered User.
Local time
Yesterday, 20:02
Joined
Aug 7, 2013
Messages
47
columns datatype
 

Attachments

  • 6.JPG
    6.JPG
    24 KB · Views: 411
  • 7.JPG
    7.JPG
    36 KB · Views: 397

Galaxiom

Super Moderator
Staff member
Local time
Today, 13:02
Joined
Jan 20, 2009
Messages
12,852
There is an issue with checkboxes not being able to be updated when connected to SQL Server bit fields unless the field is set up to not allow Nulls and has a Default value assigned. Could that be your problem?
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 20:02
Joined
Aug 30, 2003
Messages
36,125
Well, starting with picture 1, the data type of the field is int, not bit, so a textbox is what it would create. You can right click on it if you want and change it to check box, or simply create a blank check box and set the control source to that field.
 

hfs

Registered User.
Local time
Yesterday, 20:02
Joined
Aug 7, 2013
Messages
47
oh yes that worked ..just created a new check box and set the control source to the field of the table...but i am just wondering that i tried that before ,but it wasn't working! lol.Thankxx alot
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 20:02
Joined
Aug 30, 2003
Messages
36,125
Happy to help!
 

Users who are viewing this thread

Top Bottom