Automatically Update ID Number

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Aric Green
    New Member
    • Jan 2008
    • 23

    Automatically Update ID Number

    I have a customer information table that contains an autonumber field called ID NUMBER that is the primary key. The table also contains name, address, etc. I have 5 other tables that will be used for other information. All other tables have an ID NUMBER field and I would like it to create a new record automatically with the ID NUMBER fields set the same as the customer information table's when I add a new record to the customer information table. Is there a way to do this by setting up relationships, or any other quick and easy fix? Thanks.
  • FishVal
    Recognized Expert Specialist
    • Jun 2007
    • 2656

    #2
    Hello.

    Could you specify relationships between all these tables?

    Regards,
    Fisj

    Comment

    • Aric Green
      New Member
      • Jan 2008
      • 23

      #3
      Right now there are no relationships with these tables. I just want all tables to have a record created with the ID NUMBER field matching that of the customer information table when I create a new record there. I am new to relationships. Just not sure if there is an easy way to do this using relationships. If not how would I get it to do what I want?

      Comment

      • FishVal
        Recognized Expert Specialist
        • Jun 2007
        • 2656

        #4
        Well.

        What I've actually meant is what kind of relationship do you want to establish.
        To learn some base theory about it you may read Database Normalization and Table structures article.

        Regards,
        Fish

        Comment

        • Aric Green
          New Member
          • Jan 2008
          • 23

          #5
          Just taking a quick look I would say I need to set up a relationship between the customer info table's ID NUMBER field and all the ohter table's ID NUMBER fields. Is that a 1 to 1? Anyway the reason that I have several tables is that I needed over 255 fields in a table and access will not allow it. I can not reduce the number of fields any. They are all needed and all different.

          Comment

          • hyperpau
            Recognized Expert New Member
            • Jun 2007
            • 184

            #6
            A table with 255 fields sound like a table not normalized to me.
            You really should read that article posted above.


            Originally posted by Aric Green
            Just taking a quick look I would say I need to set up a relationship between the customer info table's ID NUMBER field and all the ohter table's ID NUMBER fields. Is that a 1 to 1? Anyway the reason that I have several tables is that I needed over 255 fields in a table and access will not allow it. I can not reduce the number of fields any. They are all needed and all different.

            Comment

            • FishVal
              Recognized Expert Specialist
              • Jun 2007
              • 2656

              #7
              Hello, Aric.

              You table structure is definitely not normalized. It is better not to start with the current configuration at all unless you prefer to learn on your own mistakes.
              Take a slower look at the article. :) It is worth it.

              Regards,
              Fish

              Comment

              • Aric Green
                New Member
                • Jan 2008
                • 23

                #8
                Thanks for the article, it will be very helpfull to me. Once I figure out how to normalize the tables I still want to keep my data in a couple of different tables. How do I get it to automatically create a record all other tables with the same ID NUMBER from the customer information table when I create a record in the customer information table? The ID NUMBER is an autonumber field.

                Thanks

                Comment

                • FishVal
                  Recognized Expert Specialist
                  • Jun 2007
                  • 2656

                  #9
                  Hello, Aric.

                  Could you please clarify what special reasons you have to keep your data in a couple of different tables?

                  Kind regards,
                  Fish

                  Comment

                  • Aric Green
                    New Member
                    • Jan 2008
                    • 23

                    #10
                    The reason that I want the data split into different tables is that we have different sections here at work and they all need only access to certain information. I have all the tables in a password protected back end file with only the tables that are needed linked into there mde file. I finally figured out how to get it to work the way that I need. Again, I greatly appreciate the article as it was very useful to me and will benefit me in the future. Thanks.

                    Comment

                    Working...