Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2007
    Posts
    38

    Unanswered: updating same record in 2 tables at the same time

    ok, next daft question(thanks for answering previous ones!)

    I have a main table (mobiles) that has a dlookup to a second table (SLOC) using a field courier address.

    using a query (believe it or not i dont have primary key fields) how can i set up an uipdate so that if i need to change a name in the sloc table (cos someone moves) it will also update the mobiles table?

    I thoughti new how to do it, but set up a test record and it didnt work.

    Would i need to create the record in SLOC as a primary and in relationships select it as a cascade update? is this the easiest way, or can you helpful peeps give me a nice easy solution?

    Many thanks

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    That sounds like the easiest way to me, providing the referential integrity is clean. It's also the right thing to do to enforce your referential integrity... it's just good database design to do it.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Nov 2007
    Posts
    38
    ok, i changed field in sloc table to become primary, but it still wont do the referential bit....what am i doing wrong?

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Without psychic powers it's pretty hard to tell.

    Perhaps you could elaborate a little.

    How are you doing to try to do the "referential bit"?
    Are you given an error message? How do you know it won't do the referential bit?


    If I was forced to guess, I'd say that your data is not referentially clean so when you are trying to apply the enforced integrity, the data is causing it to fail. There's only one solution to that; clean up the data first.
    Last edited by StarTrekker; 04-25-08 at 01:32.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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