Solved

Commissions Matrix

Posted on 2011-09-28
8
420 Views
Last Modified: 2013-11-29
Experts,

I am wanting to put a Banks commission schedule inside Access.
The pricing is based off a term in years.
The terms is entered in another table :  tblLetterofCredit

Example Commission Structure
Bank 1
Up to 3 years .6%
3-5 years .75%

Bank 2
Up to 4 years .6%
4-5 years .75%
 
I am not certain if the term parameters can be somehow written into a table or maybe it can be simplified quite easily.  

Thank you
0
Comment
Question by:pdvsa
  • 4
  • 3
8 Comments
 
LVL 16

Accepted Solution

by:
Sheils earned 500 total points
ID: 36719397
Yes you can add that to a table.My suggestion would be to have two tables:

tblTerms
 fldTermID (Autonumber, primary key)
fldTerm (text)

tblCommission
fldCommisionID (Autonumber, Primary key)
fldBankID (number, foreign key)
fldTermID (number, foreign key)
fldComission
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 36719476
I'm a little confused...

What is the *exact* output you are requiring?
0
 

Author Closing Comment

by:pdvsa
ID: 36814281
sb9:  I think I can work with that.  I dont completely understand it but I think once I make the tables and test it I will.  

thanks
0
 

Author Comment

by:pdvsa
ID: 36814286
I was wondering if within the table, the validation rule could somehow be used as it does have >, < and some other interesting operators.  

0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 16

Expert Comment

by:Sheils
ID: 36818074
pdvsa,

The short answer is yes but depending on which field you are referring validation may not be practical noting that most of the fields are text or autonumber.

In the structure that I have provided tblTerm acts like a lookup table. I would expect that to be a relatively short list (1-2,1-3,1-5,2-3,2-4,2-5,3-4,3-5 ...). You can get more functionality by changing the structure of tblTerm to the following:

tblTerm
 fldTermID (Autonumber, primary key)
fldTermStart (Number)
fldTermEnd (Number)

So the table (minus fldTermID) will look like

1 | 2
1 | 3
1 | 4
1 | 5
1 | 6
1 | 7
1 | 8
1 | 9
2 | 3
2 | 4
2 | 5
2 | 6
2 | 7
2 | 8
2 | 9
3 | 4
3 | 5
3 | 6
3 | 7
3 | 8
3 | 9
4 | 5
4 | 6
4 | 7
4 | 8
4 | 9

Then you can use validation to ensure that termend is greater than termstart.

The row source for  fldTermID in tblCommission will be:
Select fldTermID, [fldTermStart] & " - " & [fldTermEnd] & " years" As Term

The beauty of this approach is that it will allow you to compare commissions that fall within a certain period. For example if you want to find the terms that start at less than 4 years and does not require to extend to more than 6 years you would use the following query:

Select fldComission, fldTermID
 FROM tblTerms INNER JOIN tblCommission ON  tblTerms.fldTermID=tblCommission .fldTermID
where fldTermStart<4 AND fldTermEnd<6

This will allow you to quickly find the best commision that meets this criteria.


 
0
 

Author Comment

by:pdvsa
ID: 36818900
sb9,

I was thinking that I could maybe use Vlookup for this.  
I know that Vlookup could be used a simple solution to this but in Excel.

I am not certain how a Vlookup could be used to lookup in a table ini Acces.

Please take a look at the Excel sheet.  
There are 2 fields colored green with the Vlookup formula that references a named range which is sorted ascending.  Sorted Ascending is what makes it work.  

let me know what you think about that approach.  thank you
Vlookup.xls
0
 
LVL 16

Expert Comment

by:Sheils
ID: 36893617
pdvs,

The Access equivalent to vlookup is DLookup. Syntax:

Dlookup("LookupField", "Table", "Criteria")
0
 

Author Comment

by:pdvsa
ID: 36894342
ahhh...ok thanks ...will work on this.  
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now