Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / July 2007

Tip: Looking for answers? Try searching our database.

yes/no combobox, null and bit or tinyint field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Charles Calvert - 02 Jun 2007 00:26 GMT
I'm using SQL Server 2000 with Access 2000/2002/2003 (file is
formatted as 2000).

I have a field in a table in SQL Server that is linked to the Access
file.  The field was originally a bit, but I have also tested with
tinyint.  The field allows nulls and the default is null.

I would like to have a combobox containing the values "yes" and "no"
bound to the field.  When the value is Null, I would like nothing to
be selected.  When the value is 0 or 1, I would like "no" and "yes" to
be selected, respectively.

After googling the archives for over an hour, I have found posts
stating that Access doesn't play well with bit fields containing null,
so I switched to tinyint.  That seems to avoid the complaints from
Access, but it is interpretting null as 0 and selecting "no".

Is there a way to do what I want?

Thanks,
Signature

Charles Calvert             |  Software Design/Development
Celtic Wolf, Inc.           |  Project Management
http://www.celticwolf.com/  |  Technical Writing
(703) 580-0210              |  Research

Allen Browne - 02 Jun 2007 05:45 GMT
Tinyint should work fine.

How it the combo set up?
Try properties like this:
   Row Source Type    Value List
   Row Source            1;"Yes";0;"No"
   Bound Column        1
   Columns Widths      0

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> I'm using SQL Server 2000 with Access 2000/2002/2003 (file is
> formatted as 2000).
[quoted text clipped - 16 lines]
>
> Thanks,
Charles Calvert - 27 Jul 2007 19:07 GMT
>> I'm using SQL Server 2000 with Access 2000/2002/2003 (file is
>> formatted as 2000).
[quoted text clipped - 16 lines]
>    Bound Column        1
>    Columns Widths      0

Thanks for the response.  I ended up kludging something together to
slave an unbound combo to a bound textbox.

I think that I tried something like this, but I may have messed up one
of the properties.  I'll try again and see what happens.
Signature

Charles Calvert             |  Software Design/Development
Celtic Wolf, Inc.           |  Project Management
http://www.celticwolf.com/  |  Technical Writing
(703) 580-0210              |  Research

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.