Avatar of mlcktmguy
mlcktmguyFlag for United States of America

asked on 

CheckBoxes on Form Bound To SQL Server Table

Access 2013, SQL Server Developer 2014

Background
I am new to SQL but have been working with Access for a very long time.  I have the SQL DB defined and some of the tables populated.  I currently have the SQL table linked to the Access front end using the Linked Table manager.

I am creating a new form, bound to a SQL linked table using the form Wizard.

In the wizard I select the linked table fields that I want on the form.  The form is created containing the select fields.  A couple of the fields are defined as 'Bit' in the SQL table.  They show as Yes/No if I look at the table design in Access.

In the past, when using an Access back end DB and the form wizard, type 'yes/no' fields are created on the form as check boxes, which is what I want.

When the form wizard creates the 'bit' fields on the new form, they are created as textboxes.  If I right click on one of these fields and select 'change to', Checkbox is not permitted.  Only 'label', 'listbox' and combobox are allowed.

Either with the form wizard or by some other means, how can I make the SQL 'bit' field appear as, and function properly as a 'checkbox'?
Microsoft AccessMicrosoft SQL Server

Avatar of undefined
Last Comment
mlcktmguy
Avatar of PortletPaul
PortletPaul
Flag of Australia image

Have you set the default value of those bit fields (in mssql) to zero?
I believe that is necessary.
To resolve the problem with bit data type, do one of the following:
Using SQL Server, open the table in Design view, and assign a default value of 0 (zero) on all bit fields.

NOTE: With this option, you must update records that were entered before this change was made. See the next item for more information.

Using SQL Server, run an Update Transact-SQL statement against the table, and set all bit fields that have a value of Null to a new value of 0 or 1.
https://support.microsoft.com/en-gb/kb/280730
Avatar of PortletPaul
PortletPaul
Flag of Australia image

By the way.

In mssql a bit field can be NULL or 0 or 1
(3 possible states)
In Access a yes/no is only yes or no

And
The default could be 1
Avatar of mlcktmguy
mlcktmguy
Flag of United States of America image

ASKER

I double checked the definition.  All of the bit fields in the table bound to the form I'm creating appear to have a default of 0.  I don't see any [Null].

Each field has this definition in its column properties

Default Value or Binding     ((0))
Avatar of PortletPaul
PortletPaul
Flag of Australia image

well that's me out then - sorry
Avatar of mlcktmguy
mlcktmguy
Flag of United States of America image

ASKER

No reason to be sorry, all suggestions are welcome and encouraged
Avatar of mlcktmguy
mlcktmguy
Flag of United States of America image

ASKER

I was thinking this might be a common thing that Access developers encountered.

Anyone else have ideas?
ASKER CERTIFIED SOLUTION
Avatar of PatHartman
PatHartman
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of mlcktmguy
mlcktmguy
Flag of United States of America image

ASKER

Thanks
Microsoft Access
Microsoft Access

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.

226K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo