Results 1 to 8 of 8
  1. #1
    4 Star Lounger
    Join Date
    May 2003
    Location
    Austin
    Posts
    401
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Back to Basics (97-SR2)

    So I'm working with this non-normalized, non-relational database with orders not to change it.

    On a form is a combo box which contains values that are in the same table as the rest of the data
    and the RowSource for the list is defined in the table.
    How can I change the RowSource property in the table in an onchange or NotInList event from the form, to reflect the new data?

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Back to Basics (97-SR2)

    Have you to change the rowsource or a simple
    Me.ComboName.Requery
    will do it ?
    Francois

  3. #3
    4 Star Lounger
    Join Date
    May 2003
    Location
    Austin
    Posts
    401
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Back to Basics (97-SR2)

    Its based on the table itself not a query.
    And the values are going directly into the table, not a separate table.
    Does that make sense?
    We're talkin 1 step below 1NF...I think.
    Non-relational-non-normalized.

  4. #4
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Back to Basics (97-SR2)

    Me.ComboName.Requery
    don't mean the combo has to be based on a query. If the rowsource is a table, it will re-read the table. Even if it is the same table as the source table of the form.
    The only thing you have to look at is that the record has to be saved before the requery or or will not be reflected in the combo.
    Francois

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Back to Basics (97-SR2)

    You don't need NotInList turned on in that situation. If the combobox is a "SELECT DISTINCT [FieldName] FROM ThisTable", then a simple requery of the combobox should do it, once you save the record.
    Charlotte

  6. #6
    4 Star Lounger
    Join Date
    May 2003
    Location
    Austin
    Posts
    401
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Back to Basics (97-SR2)

    But if it's SELECT DISTINCT from mytable
    I cant' enter any new data to update the RowSource...
    This is really frustrating! <img src=/S/scream.gif border=0 alt=scream width=15 height=15>
    Here's a clip of the supplied table.
    Can I append to the list of values from a combobox
    on a form based on this same table?
    Attached Images Attached Images

  7. #7
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Back to Basics (97-SR2)

    The easiest way to do this would be to make a table with the data of the rowsource and the make this table the source of the combobox.
    Then it will be possible to add new records and requery the combo.
    Francois

  8. #8
    4 Star Lounger
    Join Date
    May 2003
    Location
    Austin
    Posts
    401
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Back to Basics (97-SR2)

    Yeah, Agreed.
    That's the way I would've done it in the first place.
    I'm through with this piece of <img src=/S/beep.gif border=0 alt=beep width=15 height=15>!
    I've achieved my primary objective,
    which was the printing of the list, so now I'll just hand it back over to
    the idiot that designed it and basically tell them in very polite words
    "garbage in-garbage out"
    Hey, thanx!!
    I appreciate all the advice and suggestions.

Posting Permissions

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