Results 1 to 4 of 4
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Brookline, Massachusetts, USA
    Posts
    606
    Thanks
    17
    Thanked 0 Times in 0 Posts

    Combo Box Data (2003 SP3)

    I have recently normalized a large table (with HansV's help) into tblMain and tblContrib. I have added a subform, sbfContrib in datasheet view, to frmMain. The subform has three columns, Contribution, Date and Event, corresponding to the fields in tblContrib . These are all populated with data. I want to change the Event field from a Text box to a Combo Box, so that new entries will have a choice. I know how to create the Combo Box, which will get its values from a table. The selected value will be stored in tblContrib. What I want to ensure is that I don't overwrite the existing data when I change from text box to combo box.
    HH

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Combo Box Data (2003 SP3)

    You shouldn't have a problem.
    When you convert the text box to a combo box, the Control Source will remain the same: the Event field. The Control Source determines to which field in tblContrib the combo box is bound.
    The Row Source property of the combo box determines which values are displayed in the dropdown list. The Row Source can be a table or a query. As long as this table or query contains all values that are present in the Event field, the combo box will work OK.

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Brookline, Massachusetts, USA
    Posts
    606
    Thanks
    17
    Thanked 0 Times in 0 Posts

    Re: Combo Box Data (2003 SP3)

    Yes, it works OK. One more question. The new values that are stored in the Event field in tblContrib are numeric, the index of tblEvents. The old values are the text values that were entered maually, before the list got too long. It's not critical, but is there any way to store the text value in the field rather than the index? Then the field entries would be consistent. I know that Access is working correctly here and I am being picky. Would it work if tblEvents had just one field, Event and no index (foreign key)?
    HH

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Combo Box Data (2003 SP3)

    I would use numeric values throughout. You can use an update query based on tblContrib and tblEvents to replace the text values with the corresponding numeric index values.
    Then change the field to a number field (long integer).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •