473,516 Members | 2,865 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Balance

Gx
I have this combo box with the following products to choose from:
A,B,C

Each has its own percentage buyback rate.
ie. A has 50% B has 25% C has 10 %
My problem is how to associate these percentage rates to the product chosen
from the drop down menu combo box.
eg. choose A in combo box,
then in the next field "Amount" you type $100
as a consequence the next field called "Buyback Balance" would then show
$50.
Can this be done in a query?
Nov 12 '05 #1
3 2314
If the buyback rates are in the table, or another table with a foreign key
to the product table, create an extra column in the RowSource of your Combo
box, for the buyback rate and in the AfterUpdate event of the Combo, set it
into another text box as (assuming it is the third column, which for coding
purposes are numbered from 0, but in the Properties box are numbered from
1 - only a little confusing)

Me!txtAnother = Me!cboSelectProduct.Column(2)

where, of course, you replace "txtAnother" with the name of the TextBox on
your Form and "cboSelectProduct" with the name of the Combo Box on your
Form.

Larry Linson
Microsoft Access MVP

"Gx" <sk**@optusnet.com.au> wrote in message
news:3f***********************@news.optusnet.com.a u...
I have this combo box with the following products to choose from:
A,B,C

Each has its own percentage buyback rate.
ie. A has 50% B has 25% C has 10 %
My problem is how to associate these percentage rates to the product chosen from the drop down menu combo box.
eg. choose A in combo box,
then in the next field "Amount" you type $100
as a consequence the next field called "Buyback Balance" would then show
$50.
Can this be done in a query?

Nov 12 '05 #2

Assuming the two fields are called Percentage and Amount, create a new
field in the query by typing:

BuybackBalance:Amount*Percentage

This will re-calculate when you alter either Percentage or Amount, and
can, of course, be front-ended in a form.

Hope this helps.
--
Andy Briggs
Elmhurst Solutions Limited
http://www.elmhurstsolutions.com
Posted via http://dbforums.com
Nov 12 '05 #3
It sounds as if you entered the values into the list box - and did not
use a table to fill the list box - is that correct?? If so then there
is no way to use a query to determine the value.

If you create a table for A, B, C and have a field for the % then once
the user selects a value you can get the assoc. % from the table - or
could even use the % as the identifying field (if there are no two
values with the same %.
"Gx" <sk**@optusnet.com.au> wrote in message news:<3f***********************@news.optusnet.com. au>...
I have this combo box with the following products to choose from:
A,B,C

Each has its own percentage buyback rate.
ie. A has 50% B has 25% C has 10 %
My problem is how to associate these percentage rates to the product chosen
from the drop down menu combo box.
eg. choose A in combo box,
then in the next field "Amount" you type $100
as a consequence the next field called "Buyback Balance" would then show
$50.
Can this be done in a query?

Nov 12 '05 #4

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

Similar topics

4
473
by: Steven Stewart | last post by:
Is it possible to do the following? I have a field called BalCarFor (Balance Carried Forward). If the primary key of a new record is identifcal to a primary key of a previous record (except for the month/year) for that specific employee, and that previous record is the most recent month/year with respect to the new record, is there a way...
3
10571
by: Greg | last post by:
On my report I want to have an opening balance signifying all transactions up to the month selected and detailed transactions for the month selected and then a closing blance. I'm perpelexed how to do this Anyone knows how the banks do it with statement formatting? suggestions, ideas welcome.
5
6760
by: bobdydd | last post by:
Hi Guys Can anyone help I am trying to find a way to implement a running balance that will re-calculate if the date order is changed, or if an earlier record is changed like you might want to do during a bank statement reconcile. I am using the following fields Date|Payment|Deposit|Running_Balance (tblTransactions)
2
1789
by: carl.barrett | last post by:
I have a text file that needs to be imported into a table on a daily basis. The data is replaced each day except for one field. This field has an account balance in it and needs to be added to each day so that it increments. What will be the bext way to do this. Regards.
1
2130
by: sjvandevoorde | last post by:
I need some help with a couple forms/test fields. Bare with me I have been out of the field for some time and only consider myself an intermediate user. The first one is a subfrom which lists records including Decrease and Increase field. I have two text fields which are suppose to total each of these fields. This subform is within another...
13
1973
by: Maria Mela | last post by:
Hello everyone... Anybody can help me on this question, please? i´ve this code in my application: /*for Card creation*/ typedef struct card { etc,etc } Card; typedef Card *PtrCrt;
3
5158
by: Paul H | last post by:
I have a transactions table and a balance table that look something like this: tblTransactions TransactionID (PK Autonumber) ClientID TransactionDate TransactionAmount (currency field, values must be >0) CRDR (indicates whether the transaction is a (credit or debit) StatementDate (Date stamp applied when the “Statement” report is run)
0
1638
by: virtualweb | last post by:
Hi: I coded a WebMall in Perl that requires the user has a positive balance saved in the WebMall in order to shop. (it is a pre-paid e-wallet style operation). Each users account is in a folder under the email address and the balance each registered user has in its account is saved in a flat file the following way: ...
1
3009
maxx233
by: maxx233 | last post by:
I need to figure out a way to generate a report to find customers in our DB that have unused credits on their account so we can void them out periodically - we manually assign them credits, they make purchases, but if they don't use the full balance of the credits in 24 hours we can negate the leftover (it's a promotional thing.) There's two...
1
2528
by: darendaren88 | last post by:
I have created this table: mysql> describe acount; +----------+---------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------+---------------+------+-----+---------+----------------+ | uniqueID | bigint(20) | NO | PRI | NULL | auto_increment | | amount |...
0
7276
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, 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...
0
7182
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...
0
7408
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7548
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5714
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3259
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1624
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
1
825
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
488
bsmnconsultancy
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...

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.