Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 472
  • Last Modified:

Commissions Matrix

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
pdvsa
Asked:
pdvsa
  • 4
  • 3
1 Solution
 
SheilsCommented:
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
 
Jeffrey CoachmanCommented:
I'm a little confused...

What is the *exact* output you are requiring?
0
 
pdvsaAuthor Commented:
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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

0
 
SheilsCommented:
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
 
pdvsaAuthor Commented:
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
 
SheilsCommented:
pdvs,

The Access equivalent to vlookup is DLookup. Syntax:

Dlookup("LookupField", "Table", "Criteria")
0
 
pdvsaAuthor Commented:
ahhh...ok thanks ...will work on this.  
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now