Thursday 19 April 2012

A user friendly interface

Now we've got the first three tables sorted out we can look at creating a meaningful, logical and useful interface so that we can enter the details of trades, and look at historical trades in detail on the same screen. You won't believe how easy this is to accomplish!

With the Trades table closed, but highlighted in the 'All Tables' bar at the left of the Access workspace, all you need do is click the 'Create' tab on the ribbon and then click 'Split Form'. As if by magic a form apprears on your desk top, and although it wouldn't win any beauty pageants it is amazingly simple to use. The image below shows what it look like:


The form is split into two parts, and this type of form is known as a 'Master/Detail' form. In simple English the 'Master' is the Trades table and the individual records are shown at the bottom of the form. The detail of the currently selected Trade is displayed in all its glory at the top of the form. At the bottom of the form are some 'VCR' buttons to navigate the Trade records. Enter some dummy records and get a feel for it; notice how every time you move to a different trade in the bottom section that the detail section updates to show, unsurprisingly, the details of that particular trade. Also, remember the 'Descriptions' entered when designing the Trades table? Well, they appear in the status bar at the bottom of the Access workspace - highlighted in the picture.

What is happening is that in reality you are looking at two forms. The detail section 'interrogates' the TradeID of the current record and then uses that to pull out the individual fields that make up that record and display it in a form that makes a lot of sense to stupid humans!

Over the next couple of posts we'll look at ways of enhancing that rather austere looking form, and of improving its functionality...to start with we'll look at showing the ROI on the current trade, and later can look at things like diplaying your current Profit / Loss and or Bank Balance and a host of other things.

We'll also take a look at how we can get useful information out of the database in another way - you'll be introduced to the notion of a database 'query' and start looking at some calculations.

No comments:

Post a Comment