• Update a field with the chages value of another

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Update a field with the chages value of another

    Author
    Topic
    #352919

    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

    Viewing 0 reply threads
    Author
    Replies
    • #514709

      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.

      • #515050

        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.

        • #515121

          Just keep in mind that no matter how idiot-proof your application is, there’s an idiot out there somewhere who can break it!

          • #515223

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

            Thanks much, again.

    Viewing 0 reply threads
    Reply To: Update a field with the chages value of another

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: