Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    Minneapolis, MN, Minnesota
    Posts
    162
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Update Query (ACCESS 2000)

    I have two tables with a primary field called Client ID. When this field is updated I would like to run an update query in the AfterUpdate Event that will update the same record in another table.
    Example: When tblBaseline.lngClientID.Value = 1234-ABC is changed to 9876-XYZ; then the update query should find tbl3Months.lngClientID.Value = 1234-ABC and change it to 9876-XYZ.)
    Is this possible and if so how?
    Easy Access

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

    Re: Update Query (ACCESS 2000)

    By "primary field", do you mean Primary Key? If so, why is it changing in the first place? Primary keys normally NEVER change since their entire purpose is to identify a unique record, nothing else. YOu also would not normally have another table with the same key value as a primary key unless there was a one-to-one relationship between the tables. In any case, enforcing referential integrity with cascading updates should handle changes if they become necessary. Your real problem is why they should be necessary.
    Charlotte

  3. #3
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    Minneapolis, MN, Minnesota
    Posts
    162
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Update Query (ACCESS 2000)

    i didnt mean key, sorry. The field is one of the fields that is indexed.
    Easy Access

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

    Re: Update Query (ACCESS 2000)

    You're going to have to explain more about what you need to do. Why do you need to change another table based on the value in the current one and what is the relationship between the two tables?
    Charlotte

Posting Permissions

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