473,387 Members | 1,517 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 2312
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
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...
3
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...
5
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...
2
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...
1
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...
13
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
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...
0
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...
1
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...
1
by: darendaren88 | last post by:
I have created this table: mysql> describe acount; +----------+---------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra |...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.