A very complicated query

GizmoT

Registered User.
Local time
Today, 09:22
Joined
May 28, 2003
Messages
86
OK – now I really AM struggling to get my head round this one.

Scenario

I am developing a database for a Finance Company/brokers.

They have a group of lenders, all of which offer different schemes. Each scheme (and each lender) have different criteria for approval, and different interest rates etc.

I have tables tblLender, tblScheme, tblCustomer (amongst others). In tblScheme, I ahev fields for Min Age, Max Age, Min Income, PropertyOwners? etc.

Problem

I have a form to enter all of the customer’s details, name address, DoB, Age, employment, property details, income, etc. etc. Once entered, I want the database to “trawl” the different schemes and find which one the customer’s criteria meets.

i.e. Mrs X is 60, earns £25k, owns her property, wants to borrow £15k.

Scheme A - will only lend to Max age 55.But will lend up to £25k to owners.
Scheme B – will lend to Max age 65, and will lend up to £50k to owners.
Scheme C - will only lend to tenants.
Scheme D – will lend to Max age 65, but will only lend up to £10k.

When the application trawls it should only come up with Scheme C, since this is the only one that Mrs X meets all the qualifications for. This is a simplified example, since there are about thirty different criteria to each scheme.


If that is not enough for you:

The returned schemes that meet the criteria should be arranged in order of which pays the most commission to the Finance company.


…….takes a deep breath, and lights another cigarette.


Anyone fancy giving a pointer????
 
I would create a query that pulls those schemes that meet the criteria, than another query based on that, that would join your other table/s and return the proper data.
Just off the top of my head.
 
Thank you

Fofa

You were spot on. Did it last night and it works perfectly.

Thank you so very much
 

Users who are viewing this thread

Back
Top Bottom