Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Access 2007

  1. #1
    New Coder
    Join Date
    Apr 2008
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access 2007

    Hi Everyone

    For my upcoming project I want my database in access2007, to have a particular field updated across say 4 tables.

    For instance I have field called product_code in one table, so when I update the record in this field it will update all the tables in the database that have the field name product_code of the same record.

    How do I achieve this, hopefully i have made sense?

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,438
    Thanks
    75
    Thanked 4,372 Times in 4,337 Posts
    Ummm...do you mean you want to update the primary key and have all the foreign keys update??? Or are you actually storing duplicate values in all those tables?

    If you are talking about a PK/FK relationship, then you can specify "CASCADE UPDATE" (along with "CASCADE DELETE") for the FK, and then a change to the PK will automatically change the links to it.

    You should be able to find "CASCADE UPDATE" or at least "CASCADE" in the Access "help".

    But if you show a bit more of your db design, including a smidgen of sample data, we might be able to give another and/or better answer.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #3
    New Coder
    Join Date
    Apr 2008
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This is the rough layout of the tables in the database:

    Products
    productCode, thumbnail, hiRes, categoryID, videos

    Categories
    categoryID, description

    Resources
    productCode, handbook, software, drivers

    Wholesalers

    Events

    Contacts

    In heind sight if i edit the productcode in products table it should be reflected in the resources table or any table in the database with the same field name. How do i go about executing this?


  •  

    Posting Permissions

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