Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Form/subform please!!!

Status
Not open for further replies.

MarkRCC

IS-IT--Management
Apr 26, 2001
167
CA
Hi.

As a newbie to Access I have received tonnes of GREAT advice on building tables in the "tables and relationships" forum. I'm now in the process of building forms and subforms, etc.

My basic database requirements and table info is listed below.

I have already built the basic "ADD" forms (Add New Insurance Company, Add New Broker, etc) and am now working on the main "working" form.

What I'm looking for (or at least envisioning) is a main form that will allow a user to search for/select a broker from the <tblBrokerInfo> table with a confirmation once the correct broker record is found. Once &quot;confirmed&quot;, the focus is shifted to the subform that allows the user to select the Insurance Company (located in the <tblCompanyInfo> table that the selected broker's had sale(s) for. This should then populate the subform with that company's commission rates that are stored in the same table.
Once this occurs, the user will enter the selected Broker's &quot;FYC&quot; info (dollar amount that the broker earns as a base commission depending on the Insurance company they had a sale for( the one we just selected))...please see info below).

Once the FYC is entered, either a &quot;Calculate Commission&quot; button or something like that is pushed and the Broker's commission(s) for that company is calculated and stored in <tblBrokerMonthlyData>. The user should then have the option of selecting another Insurance Company that the same Broker had sale(s) for that month or to select a new Broker.

Just a quick footnote: My intentions for this question is not to have someone create/code the form/subform for me (although if someone wishes to, then by all means please do..<smiling>), but to help me get started by doing some hand-holding.

Many thanks for any and all help and/or suggestions. You folks are the best!!

Please see below for details.

Mark
______________________

Scope of the project:

There're approximately 1000 independent brokers who sell either traditional insurance (life, health, etc) OR &quot;money&quot; stuff (mutual funds, stocks, etc) for (as of now) approximately 20 different insurance companies. Our company acts as a middle-man between the independent brokers and the insurance companies. We have to calculate each broker's commission based on the amount of the sale (the broker's FYC, which would be entered for each broker each time there's a sale) and the broker's commission percentage rate (For traditional insurance this is a static rate that changes relatively infrequently but for &quot;money&quot; sales, this number is either calculated using the same formula as the traditional insurance OR is an amount that has to be entered by an end-user). Our company get's a cut of the total commission using a &quot;total bonus rate&quot; (this is a percentage as well). Both types of &quot;sales&quot; (traditional and money sales) have different rate calculations.

For example,

Broker John Doe sells a life insurance policy this month (to a client while representing insurance company A resulting in $1000.00 in premiums) and shares of a hot stock (to a client while representing insurance company B resulting in premiums of another $1000.00). John Doe's FYC (First Year Commission - his base commission)is $100.00. (an amount determined by our company) John Doe's commission would be calculated in the following manner:

Company A: Sells $1000.00 in life insurance premiums.
$100.00 (FYC) * 170% (broker's percentage) = $170.00
(amount John Doe receives from the $1000.00 premium)

Company B: Sells $1000.00 in stock premiums.
$100.00 (FYC) * 170% = $170.00 OR an amount that has to
be manually entered depending on the insurance company

Our company receives a &quot;cut&quot; of the commission in this way:
Depending on the insurance company, the rate is a
percentage and can be 185%, 200%, etc. Thus,
our cut is:
FYC * (200% (depends on the ins. company) - broker's %)
$100.00 * (200% - 170%) = $100.00 * 30% = $30.00.

For each broker, these commissions must be tracked for EACH insurance company on a monthly basis as well as a Year-To-Date.

The data collected for John Doe each month is:

His name
His commission rate.
His monthly commission for each company he had sales.
His total monthly commission for all companies.
His total monthly FYCs (base commissions).
His total FYC for the YTD.
Our company's monthly commissions generated by that broker.
Our company's YTD commissions generated by that broker.
--------------------------

I have three tables as follows:

tblBrokerInfo
brkrID - Primary Key (links to tblBrokerMonthlyData)
brkrLN - Broker's Last Name
brkrFN - Broker's First Name
brkrCompanyName - name of company if no ind broker
brkrOffLoc - Location of broker's office
brkrORRateA - Broker's commission rate (in %)
brkrORRateIA - Broker's commission rate (if sale was
with a single, specific company)

tblBrokerMonthlyData
BrokerID - links with <tblBrokerInfo.brkrID> field
CompanyID - links with <tblCompanyInfo.CompanyID> field
BrokerFYC - Broker's base commission rate (can change)
BrokerORMS - Broker's commission (Money Sales)
BrokerORLS - Broker's commission (Traditional Sales)
FHORLS - Our Company's commission on the broker's sale
(Traditional Sales)
FHORMS - Our company's commission on the broker's sale
(Money Sales)
Month - Month in which the sale was recorded
Year - Year in which the sale was recorded.

tblCompanyInfo

CompanyID - Primary Key - links to
tblBrokerMonthlySales.CompanyID>
CmpnyName - Name of the Insurance Company that the
broker represented for the sale.
TotalORRateLS - commission rate (in %) that our company
receives from this company for each
traditional sale.
TotalORRateMS - same as above for money sales.
 
PS. Sorry for the novel I wrote above. I just thought it would be pertinent for you to have as much info as possible.

Thanks again!

Mark
 
Mark,

I think it would be best for you to try building the form yourself, and post with more specific questions. When building tables, it's easy to answer vague questions, because there are so many formal rules. But when building the interface, it's usually a lot easier to go with specific questions.

One note: in places where the user is only chosing one criterion, and where the search doesn't take a really long time, I usually avoid confiramtions, as users just see them as extra required mouse clicks.

Another note: the &quot;calculate commission&quot; button probably isn't needed, as you can do those calculations in the afterUpdate event of the text box that holds the FYC.

Good luck.

Jeremy

==
Jeremy Wallace
AlphaBet City Dataworks
Access Databases for Non-Profit Organizations

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Hi Jeremy.

Thanks for your rapid response.

I have been working on a form/subform for what I think I need. Just thought in the original post I would try to give as much info as possible (too much??). I was being general as I want to make sure my basic understanding of forms/subforms is correct.

The main form consists of the Broker's data (LN, FN, Office Location, etc). The subform is a continous form that would allow the user to enter the name of the Ins. Company that the broker worked for. When entered, that company's commission rates would be pulled from the companyinfo table and displayed. Also, the Broker's FYC would have to be entered. I agree, a &quot;calculate commissions&quot; button is not needed.

My question is that once I have selected a Broker on the main form (at this point just using the record navigation buttons and going through the table until the one I want is found...Once I get the form/subform to work correctly I will attempt to add a search function), I tab through the main form until I get to the subform. On the subform, the user fills in the FYC rate and then tabs to the Insurance Company box (a combo box). Once the user selects an Ins. Company from the combo box it should then update the commission rate{s) on the subform. At this point, I can create a query or something using the &quot;afterupdate&quot; event as you suggested. Once completed, I can then either choose another Insurance Company for the same Broker by tabbing to the next subform record or go back to the main form and choose another Broker.

I'm assuming that the subform automatically &quot;links&quot; itself with the record on the main form (I created it using the wizard), but how do I take all the information generated and make sure it's saved for that Broker in the corresponding <tblBrokerMonthlyData>?

Again, Many thanks for all your help!

Mark
 
Mark,

If you used the wizard, all the data will be stored in the correct place. Try it out.

Jeremy

==
Jeremy Wallace
AlphaBet City Dataworks
Access Databases for Non-Profit Organizations

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Jeremy.

I had already built the form/subform (twice) using the wizard and the table <tblBrokerMonthlyData> is not being updated at all. Sorry for being such a pest, but normally I can figure these things out. This is frustrating because I'm sure I'm just missing a small &quot;something&quot; to make it work.

Mark.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top