Results 1 to 4 of 4
  1. #1
    jennej is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2011
    Posts
    3

    Yes/No Combo Box

    I am new to Access, I am trying to create a drop down which is bound to a bit field. I want to display Yes and No as the choices, and save 1 or 0 to the database respectively (SQL backend if it matters)

    Here are the values I have
    On the data tab:
    Row Source: 1;"Yes";0;"No"
    Bound Column: 1
    On the Format Tab:


    Column Widths: 0";1"

    Everything seems to save in the database correctly, but when I choose a value from the drop down it isn't displayed it is just blank.

  2. #2
    SteveF is offline Generally AccessAble
    Windows XP Access 2010 32bit
    Join Date
    Nov 2010
    Location
    Fourth Corner
    Posts
    123
    Quote Originally Posted by jennej View Post
    I am new to Access, I am trying to create a drop down which is bound to a bit field. I want to display Yes and No as the choices, and save 1 or 0 to the database respectively (SQL backend if it matters)

    Here are the values I have
    On the data tab:
    Row Source: 1;"Yes";0;"No"
    Bound Column: 1
    On the Format Tab:
    Column Widths: 0";1"

    Everything seems to save in the database correctly, but when I choose a value from the drop down it isn't displayed it is just blank.
    In your combo box properties, what's the number in the "columns" property? It needs to be set to 2 to display the second column from your RowSource.

    Steve

  3. #3
    jennej is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2011
    Posts
    3
    I have the
    Column Count = 2

  4. #4
    jennej is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2011
    Posts
    3

    Solved - Thank You

    Thank you for you help, I figured it out with the help of a post somewhere else. It seems access doesn't do well with SQL bit types, I changed it to a tinyint and problem resolved.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 01-24-2011, 07:11 PM
  2. Replies: 5
    Last Post: 01-02-2011, 10:09 AM
  3. Replies: 1
    Last Post: 08-26-2009, 10:45 AM
  4. Replies: 3
    Last Post: 02-26-2009, 10:17 AM
  5. Replies: 0
    Last Post: 08-17-2008, 12:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums