Results 1 to 8 of 8
  1. #1
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    OnClick Event (A2K)

    I don't even want to tell you where this is going to be used, but
    Cheers,
    Andy

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: OnClick Event (A2K)

    You could execute this code in the After Update event of controls whose value contribute to the result of the calculation in txtOnHand, or in the Before Update event of the form, or ...

  3. #3
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: OnClick Event (A2K)

    Thanks Hans,

    will get back to you later to describe how the thick is plottening,
    Cheers,
    Andy

  4. #4
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: OnClick Event (A2K)

    This more complete description may help:

    The following 3 text boxes sitting on "frm Inventory
    Cheers,
    Andy

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: OnClick Event (A2K)

    Since the text boxes you mention are calculated, they don't trigger any Before Update or After Update event. You could try using the After Update event of the (sub)forms in which the user enters the received, returned and issued quantities. For example, when the user enters a number of received items, the After Update event of the Received form or subform will be triggered.

  6. #6
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: OnClick Event (A2K)

    Hans,

    Just to clarify in my own mind, the After Update event in the Received form would be triggered. I'm OK with that. I guess where I'm failing to see the light is, how exactly do I code the After Update event in the Received form to let the QOH on the Master form know that it's time to recalculate and execute back to the table. Sorry for my inability to quite grasp this,
    Cheers,
    Andy

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: OnClick Event (A2K)

    You could try code like this in the After Update event of the relevant forms:
    <code>
    With Forms![name of the master form]
    .Recalc
    ![WB_QOH] = ![txtOnHand]
    End With
    </code>
    This will work from a subform, and also from a stand-alone other form, as long as the master form is open while this code is run.

  8. #8
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: OnClick Event (A2K)

    Hans,

    One giant step for mankind....

    Never have so many, owed so much .....

    Let not what your country can do for you......

    Otherwise, those four little lines of code are right up there in my mind with the above statements.

    Thanks ever so kindly,
    Cheers,
    Andy

Posting Permissions

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