Thursday 19 April 2012

Enhancing the interface

Whilst it couldn't be simpler to create the Trades form, the default layout that Access creates isn't particularly pleasing on the eye, with the boxes for data display / entry taking up far too much real estate on the screen for their content. We don't need a long box to contain our stakes and profit / loss for example, so we'll address that now.

Prior to editing the form there is one other modification to make. Open the Trades table in 'Design' view (right click on the table name in the Navigation panel). Ensure the 'Design' ribbon is active and select 'Property Sheet' from the 'Tools' group at top right. Navigate to the Stakes field, and enter 0 (zero) as the Default value; do the same for the PL field. This will ensure that when you select a new / blank record that these two boxes now contain '£0.00' - making the whole thing look a bit more intuitive. Close and save changes.

Now open the Trades form in design view. When Access created the form it used a 'layout' arrangement. If you select the 'Stakes' text box and try to re-size it you'll find that all the boxes on that side of the layout change size as well! Not what we want. So we need to remove all the labels, combo boxes and text boxes from the layout. The simple way to do this is to 'lassoo' all the controls by clicking  and holding the left mouse button just above the first label on the left and then encircling all the controls. When you release the mouse button all controls on the form should have active orangey coloured borders round them. Then select the 'Arrange' ribbon and go to the second group of options from the left and click 'Remove'. This simply frees all the controls from the layout enabling us to re-size and re-position them as we see fit.

The TradeID label and text box are of no interest to us as users whatsoever. They relate to the inner workings of the programme and we don't care about them. So return to the 'Design' ribbon and select 'Property Sheet' from the tools group. If you click on the 'Format' tab of the property sheet you'll notice that the topmost property is named 'Visible'. Make sure that you select the TradeID label and text box and change 'Visible' from 'Yes' to 'No'. Simple!

Now is also an ideal time to change the text in some of the labels, losing the 'ID' from sportID and StratID for example, and to size all the boxes to more realistic dimensions. You might also like to change the 'Text Align' properties for the Stake and PL fields to 'right' - I don't think a form looks natural with money amounts aligned to the left of a container This is also the time to change the form title from the rather uninspiring 'Trades' to something more personal if you wish.

Getting a professional looking interface with everything properly lined up and proportioned is something I haven't the skill set or patience for, but after a bit of playing around I came up with the below as a workable form which I'm reasonably happy with.


Next time we'll look at a couple of minor enhancements to the user experience and add a text box that shows your ROI on the currently selected record.

2 comments:

  1. Just to compliment on the exceptionally detailed information. Thank you so much.

    ReplyDelete
  2. Glad you're enjoying it and hope people are finding it useful as well!

    ReplyDelete