473,465 Members | 1,946 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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.
Jun 27 '08 #1
5 1414
"Kevin" <no**@email.comwrote in message
news:fD********************@fe10.news.easynews.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

Jun 27 '08 #2
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" <he**@there.comwrote in message
news:48**********@glkas0286.greenlnk.net...
"Kevin" <no**@email.comwrote in message
news:fD********************@fe10.news.easynews.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

Jun 27 '08 #3
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" <he**@there.comwrote in message
news:48**********@glkas0286.greenlnk.net...
>"Kevin" <no**@email.comwrote in message
news:fD********************@fe10.news.easynews.co m...
>>>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
Jun 27 '08 #4
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" <fg******@example.invalidwrote in message
news:1k******************************@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" <he**@there.comwrote in message
news:48**********@glkas0286.greenlnk.net...
>>"Kevin" <no**@email.comwrote in message
news:fD********************@fe10.news.easynews.c om...
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

Jun 27 '08 #5
"Kevin" <no**@email.comwrote in message
news:9G******************@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.txtStoredFinalBid = Me.txtCalcFinalBid

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.
www.keithwilby.com

Jun 27 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Perion | last post by:
I have a simple form with, among other things, an ADODC data control (called "Adodc1"). The ADO connection to the database tests fine but when I try to add code to any of the Adodc1 control's event...
4
by: Bill Sonia | last post by:
Hello, I have a Widnows Service that creates a system event that I would like to have a Sql Server stored procedure fire when the stored procedure is called. I have a Windows Service that runs...
2
by: Jose Suero | last post by:
Hi all I have a dynamically created button, I can add an event handler with: AddHandler button.click, AddressOf static_function This works great, but what I need is to create a function that...
4
by: Jordan | last post by:
I need to dynamically add an ImageButton control to a user control and and do some server-side processing when the user clicks it. While I the ImageButton is added to the user control at runtime,...
5
by: Verde | last post by:
This is admittedly an apparently odd request... but please indulge me if you don't mind: Suppose I have two <asp:Button.../> on a page (Button1 and Button2). User clicks Button1 and triggers a...
7
by: Mrkrich | last post by:
I have one procedure that will take very long time before it finishs. During its running, I provide users a button to cancel this process if they don't want it to run anymore. I have one varible...
6
by: Jeff User | last post by:
Hi I have a WebControls.DropDownList. autoPostBack is set to true. I have code (C#) in the event procedure in the code behind and it works fine. OK, now my problem is this: While in the...
1
by: josh | last post by:
Hi, I have several independent, system components that write audit events to a database locally via ODBC and remotely via TCP, and I have a requirement to audit when the database is available for...
16
by: Neil | last post by:
I am using Access 2003, and have an ongoing problem of every once in a while losing an event procedure for a form or control. The procedure's still in the code module, but the form or control's...
0
MMcCarthy
by: MMcCarthy | last post by:
VBA is described as an Event driven programming language. What is meant by this? Access, like most Windows programs, is an event driven application. This means that nothing happens unless it is...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.