Which event procedure

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kevin

    Which event procedure

    I want a calculated control to transfer its value to a bound field in a
    table. I.e. I have a calculated control named txtFinalBid that adds several
    fields in a table. I want that number to be transfered to a bound control in
    the table named FinalBid. I've tried using all of the event handlers and
    none will make the transfer.


  • Keith Wilby

    #2
    Re: Which event procedure

    "Kevin" <none@email.com wrote in message
    news:fDHNj.4939 11$r03.48037@fe 10.news.easynew s.com...
    >I want a calculated control to transfer its value to a bound field in a
    >table. I.e. I have a calculated control named txtFinalBid that adds several
    >fields in a table. I want that number to be transfered to a bound control
    >in the table named FinalBid. I've tried using all of the event handlers and
    >none will make the transfer.
    >
    What event do you want to trigger the writing of the data? If the form is
    dirty then use the Before Update event. I'm presuming that you have a good
    reason to want to store the calculation, but have you considered doing it at
    run-time in a query?

    Keith.


    Comment

    • Kevin

      #3
      Re: Which event procedure

      The field FinalBid is in fact a somewhat arbitrary number. The form makes a
      number of calculations based on what is entered into various fields and
      creates a number that is in txtFinalBid. The user will then evaluate that
      number to come up with the FinalBid number. However, I want that number to
      change with the calculations until the end of the estimate.

      "Keith Wilby" <here@there.com wrote in message
      news:48074d72$1 _1@glkas0286.gr eenlnk.net...
      "Kevin" <none@email.com wrote in message
      news:fDHNj.4939 11$r03.48037@fe 10.news.easynew s.com...
      >>I want a calculated control to transfer its value to a bound field in a
      >>table. I.e. I have a calculated control named txtFinalBid that adds
      >>several fields in a table. I want that number to be transfered to a bound
      >>control in the table named FinalBid. I've tried using all of the event
      >>handlers and none will make the transfer.
      >>
      >
      What event do you want to trigger the writing of the data? If the form is
      dirty then use the Before Update event. I'm presuming that you have a good
      reason to want to store the calculation, but have you considered doing it
      at run-time in a query?
      >
      Keith.
      www.keithwilby.com

      Comment

      • fredg

        #4
        Re: Which event procedure

        On Thu, 17 Apr 2008 13:46:25 GMT, Kevin wrote:
        The field FinalBid is in fact a somewhat arbitrary number. The form makes a
        number of calculations based on what is entered into various fields and
        creates a number that is in txtFinalBid. The user will then evaluate that
        number to come up with the FinalBid number. However, I want that number to
        change with the calculations until the end of the estimate.
        >
        "Keith Wilby" <here@there.com wrote in message
        news:48074d72$1 _1@glkas0286.gr eenlnk.net...
        >"Kevin" <none@email.com wrote in message
        >news:fDHNj.493 911$r03.48037@f e10.news.easyne ws.com...
        >>>I want a calculated control to transfer its value to a bound field in a
        >>>table. I.e. I have a calculated control named txtFinalBid that adds
        >>>several fields in a table. I want that number to be transfered to a bound
        >>>control in the table named FinalBid. I've tried using all of the event
        >>>handlers and none will make the transfer.
        >>>
        >>
        >What event do you want to trigger the writing of the data? If the form is
        >dirty then use the Before Update event. I'm presuming that you have a good
        >reason to want to store the calculation, but have you considered doing it
        >at run-time in a query?
        >>
        >Keith.
        >www.keithwilby.com
        Then why save that calculated data if the user can change it?
        Show the calculation on the form in an unbound control.
        Have another control, bound to the field in the table, into which the
        user can enter, either the calculated total or his own value as the
        FinalBid.
        Do not store the calculation. It's valueless if it can be arbitrarily
        changed. Anytime in the future that you wish to know what the
        calculated value was, simply re-calculate it, using the saved
        component data.
        --
        Fred
        Please respond only to this newsgroup.
        I do not reply to personal e-mail

        Comment

        • Kevin

          #5
          Re: Which event procedure

          Perhaps I'm not saying this correctly. My apologies if it is unclear. the
          control txtFinalBid is not bound. It is an unbound control that calculates
          an "estimated final bid" that the user sees on screen. As the user enters
          data in other fields, txtFinalBid is continuously updated. The bound field
          is FinalBid (without txt in front). This is technically an empty field that
          the user would be required to manually enter a number for a final bid price.
          However, I want to populate that field with the calculated number from
          txtFinalBid each time that number or answer is changed.

          "fredg" <fgutkind@examp le.invalidwrote in message
          news:1k24rm30l8 bhu.1ugve46eiio dx$.dlg@40tude. net...
          On Thu, 17 Apr 2008 13:46:25 GMT, Kevin wrote:
          >
          >The field FinalBid is in fact a somewhat arbitrary number. The form makes
          >a
          >number of calculations based on what is entered into various fields and
          >creates a number that is in txtFinalBid. The user will then evaluate that
          >number to come up with the FinalBid number. However, I want that number
          >to
          >change with the calculations until the end of the estimate.
          >>
          >"Keith Wilby" <here@there.com wrote in message
          >news:48074d72$ 1_1@glkas0286.g reenlnk.net...
          >>"Kevin" <none@email.com wrote in message
          >>news:fDHNj.49 3911$r03.48037@ fe10.news.easyn ews.com...
          >>>>I want a calculated control to transfer its value to a bound field in a
          >>>>table. I.e. I have a calculated control named txtFinalBid that adds
          >>>>several fields in a table. I want that number to be transfered to a
          >>>>bound
          >>>>control in the table named FinalBid. I've tried using all of the event
          >>>>handlers and none will make the transfer.
          >>>>
          >>>
          >>What event do you want to trigger the writing of the data? If the form
          >>is
          >>dirty then use the Before Update event. I'm presuming that you have a
          >>good
          >>reason to want to store the calculation, but have you considered doing
          >>it
          >>at run-time in a query?
          >>>
          >>Keith.
          >>www.keithwilby.com
          >
          Then why save that calculated data if the user can change it?
          Show the calculation on the form in an unbound control.
          Have another control, bound to the field in the table, into which the
          user can enter, either the calculated total or his own value as the
          FinalBid.
          Do not store the calculation. It's valueless if it can be arbitrarily
          changed. Anytime in the future that you wish to know what the
          calculated value was, simply re-calculate it, using the saved
          component data.
          --
          Fred
          Please respond only to this newsgroup.
          I do not reply to personal e-mail

          Comment

          • Keith Wilby

            #6
            Re: Which event procedure

            "Kevin" <none@email.com wrote in message
            news:9GJNj.2211 4$iA4.5332@fe08 .news.easynews. com...
            Perhaps I'm not saying this correctly. My apologies if it is unclear. the
            control txtFinalBid is not bound. It is an unbound control that calculates
            an "estimated final bid" that the user sees on screen. As the user enters
            data in other fields, txtFinalBid is continuously updated. The bound field
            is FinalBid (without txt in front). This is technically an empty field
            that the user would be required to manually enter a number for a final bid
            price.
            IMHO this nomeclature will cause confusion so I will stick my neck out and
            change it for the purpose of my response because I always prefix text box
            names with "txt" for ease of identification in code.
            However, I want to populate that field with the calculated number from
            txtFinalBid each time that number or answer is changed.
            In the form's Before Update event:

            Me.txtStoredFin alBid = Me.txtCalcFinal Bid

            Obviously this will only commit the data to the field when the record is
            saved. Is that what you wanted? Again, I assume you have a good reason to
            store a value that one would normally calculate at run-time in a query.

            Regards,
            Keith.


            Comment

            Working...