473,800 Members | 2,413 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 2329
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!cboSelectPro duct.Column(2)

where, of course, you replace "txtAnother " with the name of the TextBox on
your Form and "cboSelectProdu ct" 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.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 #2

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

BuybackBalance: Amount*Percenta ge

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 to make the BalCarFor equal to the ending Balance of the previous record? i.e. the BalCarFor...
3
10607
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
6784
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
1803
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
2146
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 form which should be displaying the current balance. The subform text feilds are: Decrease - (I...
13
1997
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
5190
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
1650
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: user_01@someserver.com/Balance.txt I dont have a clue of what is needed to have a simple low end cell phone with SMS...
1
3020
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 problems I'm wrestling with though - The table doesn't have a running balance field (not that big of...
1
2547
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 | decimal(20,0) | NO | | NULL | | | BALANCE | decimal(20,2) | NO | |...
0
10505
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10275
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10253
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,...
0
9085
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6811
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5471
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2945
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.