Form returning incorrect data in ControlSource field

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ChristianC
    New Member
    • Aug 2006
    • 10

    #1

    Form returning incorrect data in ControlSource field

    I have 2 different forms that have synchronized combo boxes (selecting an option in one, changes the options available in the second). The problem is, when I save the record and open the table where the data is going, the field associated with the first combo box is filled with the ID number rather than the text.

    I've tried changing the BoundColumn property, but it affects the query/criteria that makes the second combo box function properly.

    Appreciate any help on the matter!
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    #2
    Associate the field as follows:

    Me.ComboBox.Col umn(1) ' refers to the second column, 0 is the first

    Originally posted by ChristianC
    I have 2 different forms that have synchronized combo boxes (selecting an option in one, changes the options available in the second). The problem is, when I save the record and open the table where the data is going, the field associated with the first combo box is filled with the ID number rather than the text.

    I've tried changing the BoundColumn property, but it affects the query/criteria that makes the second combo box function properly.

    Appreciate any help on the matter!

    Comment

    • ChristianC
      New Member
      • Aug 2006
      • 10

      #3
      Associating it like that causes that combo box to not function. It will not let me select any option.

      Originally posted by mmccarthy
      Associate the field as follows:

      Me.ComboBox.Col umn(1) ' refers to the second column, 0 is the first

      Comment

      • MMcCarthy
        Recognized Expert MVP
        • Aug 2006
        • 14387

        #4
        I meant that you should change the association of the field on the form that the combo box populates not the combo box.

        Originally posted by ChristianC
        Associating it like that causes that combo box to not function. It will not let me select any option.

        Comment

        • comteck
          New Member
          • Jun 2006
          • 179

          #5
          Try this. Open the properties for the combobox, and make the following changes:

          Column Count: 2
          Column Widths: 0", 1"
          Bound Column: 1

          Just one word of advice tho. If the table where the data is being stored is in any table other than the main table, then the ID is what should be stored and not the text (that is as long as there is another table somewhere that ties that ID to the text). This saves memory space. You should only ever need to access this data via a form, other than for maintenance purposes.

          comteck

          Comment

          • ChristianC
            New Member
            • Aug 2006
            • 10

            #6
            Yeah, after some struggling yesterday I figured out that I had to play w/ the column counts, widths, and bound column. Thanks for all the help, appreciate it!

            Comment

            Working...