Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Apr 2001
    Location
    Joliette, Quebec, Canada
    Posts
    290
    Thanks
    9
    Thanked 0 Times in 0 Posts

    need parameter delete and a update query (97 sr2)

    I need a parameter query to delete a customer number simultaneously in the customer file, the order number file and the sales item file. I need some direction. I also need nearly the same parameter query to attribute a new customer number in all the same files.

  2. #2
    3 Star Lounger
    Join Date
    May 2002
    Location
    Toronto, Ontario, Canada
    Posts
    314
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: need parameter delete and a update query (97 sr2)

    Well this is a new one for me... I know I don't have half the experience of many people here... but I've never seen a query that updated more than one table at once.... Unless the job is done with relationships among the tables??

    Sounds to me like you need to create some relationships with referential integrity enforced....

    Also... the delete query you were talking about.... does that mean you just want the customer number to be deleted and the field left blank, but the records to remain?.... or do you want any and all records in all three tables for that customer number deleted simultaneously?

  3. #3
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: need parameter delete and a update query (97 sr2)

    To ad to Alexya's comments and questions, if you are simply trying to replace a given customer number that exists in one or more records in several tables, then enforcing referential integrity and turning on cascading updates will do the job for you - all you have to do change the customer number in the master record and all the others will be changed.

    On the other hand, if you are truely wanting to just blank out the customer number in several records, and that is the number that joins the records, then I believe Access97 will tell you that is not an updateable query. The same is true for update queries given that the customer number is the key that links tables together.

    Give us a bit more detail and perhaps we can suggest other solutions.
    Wendell

Posting Permissions

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