"There are 10 types of people in the world. Those who understand binary and those who do not."
Showing posts with label access. Show all posts
Showing posts with label access. Show all posts

Tuesday, 28 October 2014

Format Painter

There are many common features between the Microsoft Office suite applications.  Some we use on a frequent basis such as bold, italic, underline etc.  One feature that often gets overlooked but can save you time is the Format Painter.  In a Microsoft Office 2010 application, the Format Painter can be seen in the Clipboard group under the Home tab;

Format Painter Off

So, what is the purpose of the Format Painter?  The Format Painter is used to copy formatting applied to text in Word, a cell in Excel, a control on an Access form etc. and apply it to another piece of text, or a cell and so on. For example, you are creating a Word document and you format a title to be bold, font size 20, centered, underlined and in italics.  You wish to apply this same formatting to another title elsewhere in the document so, to save you making all those separate selections to achieve this, use the Format Painter.  Simple 'click' anywhere in the text you wish to copy the format from and click the Format Painter 'button'. This will change the Format Painter 'button' appearance to the following to indicate that it is on;

Format Painter On

The cursor will also indicate that Format Painter is active by changing to this;

Format Painter Cursor

Now simply click on the next title (piece of text, cell etc.) to apply the copied formatting to this new destination. The Format Painter button and cursor will now revert back to the 'inactive' state.

Tips:  

If you wish to apply the same formatting to a number of different locations (ie several titles, several cells) instead of single clicking the Format Painter when activating it, use a double click.  This will keep the Format Painter active so it will continue to be able to apply the copied format until you perform a single click on the Format Painter to de-activate it.

In Excel, the Format Painter will also copy number formats, conditional formats etc.





Saturday, 9 November 2013

Access Tip - Use a Parameter Query

Access is a very powerful database application from Microsoft.  Getting required information out of an Access database is done by using a 'Query' which will search given tables and return records displaying fields which have been specified in the query and matches given criteria.


The above simple example would return all the records from the tblEmployees table which have the surname 'Jones'.  The forename is also returned as this has been specified in the query.

All very well and, if the name to be searched for is changed to 'Smith' for example, it is relatively easy to edit the criteria accordingly - if you are comfortable with editing a query!

Turning this simple query into parameter query will  make it far easier for users who may not be familiar with Access but do know how to run a query.  So how do you make a parameter query?

Instead of 'hard coding' the name to search for in the criteria (ie "Jones") replace it with a short phrase enclosed in square brackets [ ].  The text you enter in the [ ] can be anything you like - providing it is NOT the name of an existing field in the table (In this example it cannot be 'Surname' or 'Forename').  It is a good idea to make the phrase a prompt to remind the user what to enter.


When the above query is run, the user will be presented with the following dialogue box;


Using this technique makes running queries easier for those unfamiliar with Access.

Try the following in Criteria: to give more flexibility to using parameter queries.  This example will return all surnames beginning with the letters entered (ie entering 'J' will return Jones and James.  Entering 'Jo' will return just Jones);

Like [Please enter first letter(s) of surnames to search for] & "*"

In a date field, try the following to return all records with dates in the specified range;

Between [Please enter start date] and [Please enter end date]

In this example, you will be presented with the 'Enter Parameter Value' twice (once for each date to be entered) when the query is run.