Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Pennsylvania, USA
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Update a field with the chages value of another

    Which would be the best or better way. EventProcedure or Update Query via Macro.

    And could some one help me with the code for the EventProcedure.

    Access 97 sr2b

    I trying to update the value in a field(one table)by the changed value in another field(another table).

    ie: fsubCustOrdrDetl!CustQtyOrdred is change from Null to 6.

    AfterUpdate or AfterExit or AfterChange

    in tblPubs!InStock the value changes by -6

    and OnDeletion of the same record that tblPubs!InStock is changed by +6

    Thank for your time
    threecrow

    Don't make excuses. It's what you do, not why you didn't.

  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 a field with the chages value of another

    The answer depends on what exactly you want to do. You appear to want to update your InStock number in one table based on the CustQtyOrdred field in another, right? But if the field is null in your subform, does that mean you are entering a new record in the subform or that you have an empty record waiting to be filled in? You definitely don't want to update the other field until the subform record has been saved, not in the AfterUpdate or Exit of the field. Otherwise, if the user cancelled the record, you would still have changed the InStock number, which would then be incorrect.

    If you want a better answer, you need to provide specific information about the tables, fields and forms involved.
    Charlotte

  3. #3
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Pennsylvania, USA
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Update a field with the chages value of another

    Miss Charlotte, I think, that I will go with another method
    to meet my end. I trying to make the application as idiot resistand as I can for the end users. I think that I will have the figures calculated each time they are needed. Thank much for your time.
    threecrow

    Don't make excuses. It's what you do, not why you didn't.

  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 a field with the chages value of another

    Just keep in mind that no matter how idiot-proof your application is, there's an idiot out there somewhere who can break it! [img]/w3timages/icons/grin.gif[/img]
    Charlotte

  5. #5
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Pennsylvania, USA
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Update a field with the chages value of another

    Which is why I always say Idiot Resistant, even when I spell it wrong. Nothing could actually be Idiot proof.

    Thanks much, again.
    threecrow

    Don't make excuses. It's what you do, not why you didn't.

Posting Permissions

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