Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

MS 2010 Access Forms and Lookups

Posted on 2014-12-10
4
Medium Priority
?
94 Views
Last Modified: 2015-03-24
I am trying to create an Access Form to replace the Excel Workbook we currently use.

The Excel Workbook had a series of VLookup functions and drop downs to keep the entries accurate and consistent.

I am looking for help on how to do this in Access 2010.

Example 1) In the Form, an employee will select the type of new business he/she wrote and the proper bonus amount will then be displayed automatically. The bonus amount is dependent on the type of new business.

Example 2) An employee will select the company and then the line of the new business, enter the premium amount, and then the correct commission rate will be selected to display the earned revenue. The rate is dependent on the line. The line is dependent on the company.

Thank you for your help.
0
Comment
Question by:Michael Franz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 40492388
the general idea is
you have to import/create the Lookup values from excel to access tables and use the table as the rowsource of your drop down boxes.

from here you can do your coding to filter cascading combo boxes.
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 2000 total points
ID: 40492847
Then this really needs to be two separate questions...
...as what you are asking is not a "simple" question and requires a good grasp of database design.
Hear is a sample db for your first concern.
-Create a query to pull in fields from all 3 tables
-Create a form from this table
-Create comboboxes to select the employee and business

Note that you will have to research "many to many" tables, in order to determine how to set up your keys for your specific situation.
Database60.mdb
0
 
LVL 34

Expert Comment

by:Mike Eghtebas
ID: 40493142
Select Busines_type,  bonus_amount, company, premium_amount, commission_rate, earned_revenue From...

You will have above data in a query. Most likely coming from several tables:

To handle missing data do:

Select Nz(Busines_type,"") As BType,  Nz(bonus_amount,0) As BAmount, Nz(company,"") As Co, Nz(premium_amount,0) As Perm, Nz(commission_rate,0) As CommRate, nz(earned_revenue,0) As Revenue From...

Here we have 6 criterias (Busines_type,  bonus_amount, company, premium_amount, commission_rate, earned_revenue)

Build 6 text boxes for each. The following code will filter if you put some data in several and ignore the rest. What you ignore, the query will ignore it too.

As criteria in the above query (you may call it qSearch) supply criteria like:

IIF(fnBusines_type()="<all>", [Busines_type], fnBusines_type())

In a module have one function call for each criteria like

Function fnBusines_type()As Variant ' this could change to string or double to match your need.
On Error GoTO 10
Dim varVal as variant
varVal = Nz(Form!Morm1!txtBusines_type, "<all>")  'put break point to make sure the value is read correctly. 
fnBusines_type=varVal 
Exit Function
10:
fnBusines_type="<all>"
End Function

Open in new window


* please try for Busines_type only. After you make it work add another one, for example Company.
0
 

Author Closing Comment

by:Michael Franz
ID: 40684808
thank you.
0

Featured Post

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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

636 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