How do you use a checkbox with a linked SQL Server 2005 table?

R

rhardy

I have an Access front end with a linked table in a SQL Server 2005 database.
I want one of the fields to be a checkbox in Access. What data type do I
need to use on the SQL table to be able to accomplish this? Thanks in
advance for your help.
 
J

Jeff Boyce

"Bit"

(by the way, there have been issues in some versions/combinations
Access/SQL-Server with "bit" fields in SQL-Server resulting in "record
currently in use by another" error messages.

If this happens after you add the bit field, the solution I've seen (and
used) is to add one more field to the SQL-Server table, a "Timestamp" field.
This (apparently) helps SQL-Server keep track of who opened what when. Why
it's needed when a bit field is added is beyond me!

Good luck

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
R

rhardy

Gina,

I did get it working per Jeff's post - Thanks Jeff! - and I am using 0/-1.
Is there a way to change it to True/False?
 
P

Paul Shapiro

Among the issues with SQL Server bit fields being used by Access, there is a
problem with some SQL/Access version combinations if the SQL Server bit
field allows Nulls. It's safest to specify the field not allow nulls, and if
appropriate assign it a default value of either true or false. If no default
is assigned, the user must make an entry in that field before a new row can
be saved.
 

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