Combobox:Web DB, how to choose values from combobox and store them in another table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • George Tekos
    New Member
    • Dec 2011
    • 47

    Combobox:Web DB, how to choose values from combobox and store them in another table

    I have a web database, with a form that submits data to a table (table1).
    i also have another simple table (tableForCombo) that contains names, which are being shawn in a combobox.

    i want the user to
    open the form,
    pick a value from that combobox and
    store it in another table...

    how can I do this, please?
  • Mihail
    Contributor
    • Apr 2011
    • 759

    #2
    That can be done, George, but is a bad BAD BAD approach.
    In a database the things must be stored in a SINGLE place.

    Take a look here:

    If you don't change your mind after reading this, ask again and I'll help you with a solution.

    Comment

    • George Tekos
      New Member
      • Dec 2011
      • 47

      #3
      To be honest, i realise the need of having adatabse normalized, but i dont understand why having a combobox storing from one table to another is not normal.. (The reason for this is that i really have no idea how to achieve that, alternatively.. ) can you help?

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32634

        #4
        As Mihail says, it's better to store the key elsewhere, rather than the item itself.

        However, this sounds like you need to bind the ComboBox control (populated from [tableForCombo]) to the field in the form's Record Source, which should be [Table1]. Does this make sense?

        Comment

        • George Tekos
          New Member
          • Dec 2011
          • 47

          #5
          yes. this is what i want to do.
          i just had to set the second table's field as 'lookup' , point the lookup to the first table's field , and that's it..it works.
          i really thank you.
          but one question .
          isnt my database normalised now???

          Comment

          • Mihail
            Contributor
            • Apr 2011
            • 759

            #6
            Happy to hear that.

            I can't say if your database is normalized now. Because a database is normalized if every structure (read table) of it is normalized.
            But this was a big step to the normalization.

            Of course, NeoPa and other like he from this forum can teach you a lot about. Sorry but I can't because my skill.

            Comment

            • George Tekos
              New Member
              • Dec 2011
              • 47

              #7
              thank you both, anyway..

              Comment

              • NeoPa
                Recognized Expert Moderator MVP
                • Oct 2006
                • 32634

                #8
                Originally posted by George
                George:
                isnt my database normalised now???
                Although this is impossible to say without more information, there is nothing you've said which indicates that it isn't, so it could well be normalised.

                If you read the linked article you will be able to tell if your structure and design represent normalised data.

                Comment

                Working...