Hi
Is there any good ideas how to update form vb code always after some values
are changed / added by vb (not user).
I have some code behind subforms vb and there are calculations behind
"Form_Curre nt" section those I need to re-calculate after some values are
changed or added.
The problem is that if list box value is calculated in vb, access wont
regognize that valua has changed.
Simple example:
There are 4 "list box" objects in the form.
- user_input_box_ 01
- user_input_box_ 02
- vb_calculated_b ox_01
- sum_of_user_inp ut_and_vb_calcu lated_01
**This code is behind every 4 objects**
Private Sub <some_of_those_ 4_objects>_Afte rUpdate()
Form_Current
End Sub
**This code is behind form_current**
Dim var_user_input_ box_01, var_user_input_ box_02
var_user_input_ box_01 = Me.user_input_b ox_01.Value
var_user_input_ box_02 = Me.user_input_b ox_02.Value
Me.vb_calculate d_box_01.Value = var_user_input_ box_01 +
var_user_input_ box_02
Dim var_vb_calculat ed_box_01
var_vb_calculat ed_box_01 = me.vb_calculate d_box_01
me.sum_of_user_ input_and_vb_ca lculated_01.val ue = var_user_input_ box_01 +
var_vb_calculat ed_box_01
**End of code behind form_current**
How it works:
User gives values in "user_input_box _01" and "user_input_box _02"
After "user_input_box _02" value is entered "vb_calculated_ box_01" value is
calculated correctly, but.... "sum_of_user_in put_and_vb_calc ulated_01" is
empty.
When I click to "vb_calculated_ box_01" or
"sum_of_user_in put_and_vb_calc ulated_01" box -->
"sum_of_user_in put_and_vb_calc ulated_01" value is calculated correctly.
Also if I change user values, "vb_calculated_ box_01" value is calculated
correctly, but.... "sum_of_user_in put_and_vb_calc ulated_01" is calculated by
previous user values until I click "vb_calculated_ box_01" or
"sum_of_user_in put_and_vb_calc ulated_01"..
How it should works:
Some code or etc. function that I don´t need always to click those boxes
would be very nice =)
Regards,
Henry 0 2069 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: MX1 |
last post by:
I have query2 that sums a set of fields from query1. Works fine. However,
when I try to add two of the calculated fields from query2, I get prompted
for the label I gave the fields. I just hit enter and it gives me my data.
Any thoughts regarding why I'd get prompted for the field name on a
caluclated field when I try to use it in another calcuated field?
thanks! :)
|
by: Colin McGuire |
last post by:
Hi, I have an report in Microsoft Access and it displays everything in
the table. One column called "DECISION" in the table has either 1,2,
or 3 in it. On my report it displays 1, 2, or 3. I want to appear in
the report is Yes, No, or Maybe. What do I need to do to change what
appears in the report/what term do I need to search out in Google?
Thank you
Colin
|
by: Ruben Baumann |
last post by:
Just wondered if anyone has had occasion to use, or does use, FileMaker, or
Raining Data's Omnis, or Alpha5's software, and how they compare with
Access?
Ruben
|
by: jillandgordon |
last post by:
I hope this group does not mind the most basic questions. I am trying
to teach myself Access in two different versions. My company now uses
Access 97 but, in the next few months, will be switching to Access
2003, so I am taking self-paced tutorials in both.
I have a problem. I am trying to create a query from two different
tables. One of the tables has a column with either a date or an empty
field in it. What I am trying to do is...
|
by: manning_news |
last post by:
I've got a report that's not sorting correctly. I build a SQL
statement and assign it to the recordsource in the Open event, sorting
the data the way the user chooses. The user can choose up to 3 sorts
using a form that opens before the report opens.
When the report previews, it ignores the users' sort request and always
sorts by the primary key even though ORDER BY is explicity set to
another field other than primary key.
If I copy...
| |
by: alexandre.brisebois |
last post by:
Hi, I am using access 2003, I would like to know if there is an option
to reorganize the tables in a maner that is readable, as we can do in
sql sever 2000 or 2005.
I have been given a database to look a and I am loosing tremendious
amounts of time trying to organize it so that I could view it.
Regards,
Alexandre Brisebois
|
by: Haas C |
last post by:
Hi all!
Is there anyway I can override a value in a calculated field on a
form? For example:
I have a form which displays the following fields based on a query:
Premium Due field has the value of 12,527.75 in it.
Brokerage Due field is the calculated field which multiplies a factor
|
by: Ulv |
last post by:
I have a table (TblItems) with fields Lenght, Width and Height as
decimalfields. I also have the fields Desc, a text field.
In a form I have created this line of code after updating:
Desc = Lenght & " x " & Width & " x " & Height
If the values is 100, 100, 100 the result is 100 x 7920 x 100.
No matter what value I put into the width field It comes out with the
same 7920. Why??
|
by: Deac |
last post by:
I have two Access 2003 tables, one has a "Zone" and "Lot1SqFt" that
changes with each record. (8,000+ records)
A portion of this table:
CustomerID ZONE Lot1SqFt SqFtPrice TotalPrice
21 2 27100 $1,599.00
$1,979.00
37 4 15475 $1,068.00
$1,392.00
366 1 17190 $1,187.00
$1,292.00
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |