?
Solved

MS 2010 Access Forms and Lookups

Posted on 2014-12-10
4
Medium Priority
?
89 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
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 …
Suggested Courses

800 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