Results 1 to 8 of 8
  1. #1
    dwaterman is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2012
    Location
    Elkhart, IN
    Posts
    22

    Unhappy Combo Box presents as Text Box on form

    I have a 2003 Access Database that I am programming with a 2007 version. I am trying to add a new combo box to an existing form. This field presents as a combo box in the table and the underlying query for the form, but as a text box when I view the actual form. I want to combo box on the form and cannot figure out why, when I drag from the field list to the form, it is not a combo box. Any help is appreciated.

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,849

  3. #3
    dwaterman is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2012
    Location
    Elkhart, IN
    Posts
    22
    Unfortunately, I did not see anything that applied in that link. What I am trying to do is quite simple. Our company has had 3 different owners in the last few years and I am using the combo box to select the appropriate company for the record. The company table consists of one field containing the 3 company names. I did not use an ID field. I know I could use a value list instead of a look-up and that would probably work, but I'm trying to think ahead to make it easy for someone to add a name later without knowing how to code.

  4. #4
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,849
    So you are NOT using a lookup at the table level.

    If it's a combobox on a form, you can use the combo box wizard.

    Your company names table will have a layout something like

    Id (autonumber)
    CompanyName (text)
    ..other fields

    Use this table as the recordsource of the combo.

    Let the id be the field that is linked
    and CompanyName be displayed.

    There is a tutorial here that may help
    http://www.datapigtechnologies.com/f...combobox1.html

  5. #5
    dwaterman is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2012
    Location
    Elkhart, IN
    Posts
    22
    Yes. I am using the look up at the table level. I just didn't use an ID in the look up table because it was so simple. My company name is the primary key. Could that be my problem?

  6. #6
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,849
    The general advice is - Do not use lookups at table level.
    Use a separate table and use that as recordsource to populate your combo.

    Also, I would recommend you stay away from multi valued fields
    The company table consists of one field containing the 3 company names. I did not use an ID field.
    You should build tables with Primary keys. You will have less head aches if you let Access handle values for an Autonumber primary key. This field is for Access' use. It is not meant for humans. It is to ensure unique records, not necessarily incremental numbers in sequence.

    You will NOT be making things easier for people by using things like Lookups at table level, multi valued fields...

  7. #7
    dwaterman is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2012
    Location
    Elkhart, IN
    Posts
    22
    I guess I don't understand what you mean by "table level." I have a separate table for my companies and have a field in my main table that is a combo/look-up field. I have primary keys in both, but used the company field in my look-up table as the primary key instead of an Auto-number field since they were already unique. I used the company field as primary key because it's easier to write queries and such with the names than to figure out what the auto number is.

    I got my code to work by using another combo box I had planned to eliminate and establishing the values from a list. I have continued this conversion to be sure I understand the most elegant way to accomplish the task, not just anything that will work. Thanks for your input!

  8. #8
    AcsDb Guest
    Windows 7 64bit Access 2010 32bit
    --------------

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

Similar Threads

  1. Replies: 4
    Last Post: 02-22-2012, 12:43 PM
  2. Creating a Form with 2 combo boxes and a text box
    By smorris4804 in forum Access
    Replies: 1
    Last Post: 06-17-2011, 02:06 PM
  3. Replies: 0
    Last Post: 12-02-2010, 11:59 AM
  4. Entering Text in Combo Form
    By Bobt in forum Forms
    Replies: 2
    Last Post: 10-22-2010, 03:53 AM
  5. Replies: 3
    Last Post: 03-28-2009, 06:06 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