Homework H07

Business Intelligence at SmallBank: Canned Queries

Goal

Learning how you can automate the gathering of business data from a remote database and showing them in Excel.


Context

"There's got to be a better way to do that!" think you at the end of a long day of work.  You like your new job at SmallBank, with one exception.  Every day at close of business you have to access the bank DB and create dozens of updated lists of customers for management review. It is a boring, repetitive task, and a bad way to close a good day.  So, you decide to automate the task using VS, VSTO and VBA.

source:sg

In no time you create an Excel-based app that connects to the DB and produce the lists at a press of a button. Way better!

Ms. Lendalot saw your work and immediately realized its potential. 

"This is a.ma.zing! Sooooo much faster!"
"Thank you! I really did not like that repetitive task."
"You know what? We can do even better! We should give your app to the managers and let them access  updated customer reports any time they choose.  The data will be more accurate, the managers will like it better, and you will not have to do your least favorite daily chore.  It is a WIN-WIN-WIN!"


Task and Criteria

Create a VS project that implements the following requirements:

  • pressing an orange button labeled "Get VA Customers" causes Excel to show all the available info on all the customers who live in VA in an orange list object.
  • pressing a second button labeled "Get TX Customers" shows the same data for the customers who live in TX in a separate list object. Both button and list object must be light blue, black ink.
  • Make sure that the buttons do not interfere with the list objects, causing errors or partially occluding data. Place the buttons out of the way of the list objects.
  • At start, the Excel spreadsheets does not show any data (just buttons and empty list objects).
  • Make sure that the column headers show the names of the columns in the tables when filled.

The DB connection code mentioned in the video for you to copy and paste is here.