Above Header LeaderBoard <body> <!--Google Navigation Bar--> <script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener("load", function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <iframe src="http://www.blogger.com/navbar.g?targetBlogID=34083602&amp;blogName=LEARN+MS-ACCESS+TIPS+AND+TRICKS&amp;publishMode=PUBLISH_MODE_FTP&amp;navbarType=BLUE&amp;layoutType=CLASSIC&amp;searchRoot=http%3A%2F%2Fblogsearch.google.com%2F&amp;blogLocale=en_US&amp;homepageUrl=http%3A%2F%2Fwww.msaccesstips.com%2F" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" height="30px" width="100%" id="navbar-iframe" allowtransparency="true" title="Blogger Navigation and Search"></iframe> <div></div>
Header Right Columns
www.msaccesstips.com

LEARN MS-ACCESS TIPS AND TRICKS

Home

LEARN MS-ACCESS TIPS AND TRICKS

↑ Grab this Headline Animator

Your Ad Here
Saturday, January 17, 2009

Drill-Down Inquiry Screen

Following is an image of a three layer Inquiry Screen, designed for the Management, to keep track of Northwind Traders staff-level Sales Performance:


Employee-level Summary


The top layer of the Form shows Sales-Person level summary of Orders and the Percentage on Total Orders. At the Footer of the Form shows the Total of all Orders put together. When clicked on a particular Employee’s record the individual Order-level Summary information will be visible on the main screen overlaying the earlier view. Check the image given below.


Order-wise Summary Screen


Several items can be ordered under a particular Order and details of all items can be displayed by Clicking on one of the Order record. Check the image given below.


Order Details Screen


The above Form shows order-level details and summary information at the Footer of the form with Total Quantity of all Orders and the Total Net-Value of all items after discount. The Command Buttons at the footer of each form is used to switch the view back to the upper layer of the form.


The Date Parameter values at the top can be changed to display information for a different period.


First of all, I would like to assure you that there is no complicated VBA Code to drive this design except one or two lines of them here and there to refresh the controls and for switching from one layer of the form to the other. Other than that the entire Screen works on Queries and Forms.


We need few Tables from Northwind.mdb sample database, to create six simple Queries, three Sub-Forms and a Main Form to organize all of them together to present the information to the User.


If you would like to see the Inquiry Screen in action before you design it, you can download it from the bottom of this post and take a look at it. If you find it difficult to figure it out how it works or how to put all of them together then come back and go through the design task step by step so that you will know how simple or difficult it is and how each element of this trick works together with others.


Here, we will see the usage of Transparent Command Buttons again, which we have already seen in an earlier Article with the same Title.


We will have to split this topic into more than one Blog-Post so that we can do the design task with ease. Even though I can show you how to do it in few minutes, explaining that on paper with images and Property settings takes lot more than that.


I know, if you download the database and take a look at it first, you will be better prepared to find out more about it and ready to go through the design task with more interest.


So, let us start the first part.


  1. Download the following Tables from C:\Program Files\Microsoft Office\Office11\Samples\Northwind.mdb (MSOffice2003 address, you can replace Office in place of Office11 if your Version of Access is 2000):



    • Employees

    • Orders

    • Order_Details

    • Products



  2. Create a Parameter Table with the following name and Structure:





  3. Field NameData Type
    StartDateDate
    EndDateDate


  4. Open the Table and create a single record with the following StartDate and EndDate values and save the record:


    • StartDate = 01-01-1996

    • EndDate = 31-12-1996



  5. Open new Queries and Copy the following SQL Strings into Query's SQL Editing Window and save them with exact Name given for each of them. Create the Queries in the same order as given here as they have dependencies on Queries created first.



  6. Query Name: 00_Orders_MainQ



  7. SELECT Orders.*
    FROM Orders, Date_Param
    WHERE (((Orders.OrderDate) Between [StartDate] And [EndDate]));


  8. Query Name: 01_OrderCount1



  9. SELECT Employees.EmployeeID,
    [FirstName] & " " & [LastName] AS EmpName,
    Count([00_Orders_MainQ].OrderID) AS TORDERS
    FROM Employees INNER JOIN 00_Orders_MainQ ON Employees.EmployeeID = [00_Orders_MainQ].EmployeeID
    GROUP BY Employees.EmployeeID, [FirstName] & " " & [LastName];


  10. Query Name: 02_OrderCount2



  11. SELECT Count([00_Orders_MainQ].OrderID) AS TOTALORDERS
    FROM 00_Orders_MainQ;


  12. Query Name: 03_Employee_Summary



  13. SELECT [01_OrderCount1].*,
    [TORDERS]/[TOTALORDERS] AS PCNT
    FROM 01_OrderCount1, 02_OrderCount2;


  14. Query Name: 04_Order_ListQ


  15. SELECT [00_Orders_MainQ].OrderID,
    UCase([FirstName] & " " & [Lastname]) AS EmpName,
    [00_Orders_MainQ].OrderDate,
    [00_Orders_MainQ].RequiredDate
    FROM Employees INNER JOIN 00_Orders_MainQ ON Employees.EmployeeID = [00_Orders_MainQ].EmployeeID
    WHERE ((([00_Orders_MainQ].EmployeeID)=[Forms]![Inquiry_Main]![EID]));


  16. Query Name: 05_Order_DetailQ



SELECT [FirstName] & " " & [LastName] AS EmpName,
[Order Details].OrderID,
[Order Details].ProductID,
[Order Details].Quantity,
[Order Details].UnitPrice,
[Order Details].Discount,
(1-[Discount])*[UnitPrice]*[Quantity] AS ExtendedPrice
FROM (Employees INNER JOIN 00_Orders_MainQ ON Employees.EmployeeID = [00_Orders_MainQ].EmployeeID) INNER JOIN [Order Details] ON [00_Orders_MainQ].OrderID = [Order Details].OrderID
WHERE ((([Order Details].OrderID)=[Forms]![Inquiry_Main]![OID]));


Contd/-...

Download Link :

Download - File: inquirydemo00.zip (Size:137K)





StumbleUpon Toolbar



Multiple Parameters for Query
Form Menu Bars and Toolbars
Seriality Control - Missing Numbers
Wave Shaped Reminder Ticker
No Data and Report Error

Labels:

1 Comments:

Blogger a.p.r. pillai said…

The Parameter Table Name is Date_Param

The omission is regreted.

Regards,

January 22, 2009 8:55 PM  

Post a Comment

Note:Comments subject to Review by Blog Author before displaying.

Links to this post:

Create a Link

<< Home

Page Footer

Creative Commons License
Learn MS-Access Tips and Tricks by msaccesstips.com is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 2.5 India License.



This Page is best viewed with 1280 x 1024 Resolution

Sidebar Left
   FEATURED LINKS
SITEMAP
Command Button Animation
3D Headings on Forms
MsgBox & Office Assistant
Reminder Ticker
MS-Access & E-Mails
Automated E-Mail Alerts
MsgBox with Options Menu
Colorful Command Buttons
Configure Lotus Notes
Alerts through Network
Running this site has become a costly affair as the revenue from Ads is not sufficient to support it. If you find these pages informative & useful and would like to extend a helping hand, then please do it here.





Link Back to us with this Button

Learn MS-Access

Copy and Paste this HTML Code in your Webpage


Add to Technorati Favorites

Programming Blogs - Blog Catalog Blog Directory
Powered by FeedBurner
Add to Google

Software
Computers blogs
TopOfBlogs



AddMe - Search Engine Optimization Submit Your Site Free!
Go BlogZ Ave Blogs
eBlogzilla Changing LINKS
LS Blogs Blogarama
blog search directory BlogUniverse
Find Blogs in Directory RSS Directory
blogskinny.com ShowcaseBlogs.com
Amfibi

Search Engine Optimization and SEO Tools
Dmegs Web Directory Takeaway for Sale Businesses For Sale
Free Submission Directory Free site submission

Free Listing
 

Sidebar Right Top



Free Page Rank Checker

AddThis Social Bookmark Button

Enter your email address:

Delivered by FeedBurner



Top Blogs

Microsoft Access is the Jewell among MS-Office suite of Applications. Its Security features are excellent and works fine in Network environment. MS-Access can link/upload data from any Data Source. Applications that you design should be user-friendly and visually pleasing too. Here I would like to share my experience in Microsoft Access Programming with you and I am sure that you will find them interesting too.

My Photo
Name: Ramachandran Pillai
Location: Ruwi, Oman


If you need a Demo of any of the Topic explained here, send me an E-mail to: aprpillai@msaccesstips.com
with the Topic Description, I shall try to send a sample database to you.


Sidebar Right Top

Access Tips | Email | Reports | Report Tricks | Graphs | Forms | Menus | Animation | Security | Internet | How TOs | Linking | Query | Progress Meter | Alerts | Process Tips | Access Functions |





Site Designed by:www.msaccesstips.com