\subsection{Visual query designer}
PgAccess is using an advanced tool for visual designing of queries. For those
of you that have used Microsoft Access, it will be very familiar.

When a new query is build, an empty canvas will be presented to you. In the
bottom of the screen there is the \emph{result} zone.

Add new tables on the canvas by selecting them from the drop-down or by entering
their names in the \emph{Add table} entry and then pressing Enter.

After adding the source tables on the canvas you can make links between fields
from different tables by dragging one field and dropping it on the label of the
corresponding field in the linked table. Links can be deleted by selecting them
(the link line will change it's colour) and then press \emph{Delete} key.

In order to delete a table from the canvas, select it by mouse clicking on the
name of the table and then press the \emph{Delete} key. The tables can be moved
on the canvas by dragging them from their name labels. The entire canvas can be
 panned by dragging it from an empty area.

In order to select fields that will be included in the result, drag the desired
field from the table and drop it in the result zone in the desired column.
If there is already another field in that column, it will be shifted to the
right together with all the remaining fields to the right and the new field will
be inserted in the desired column.

You can also specify a condition for records to be included in the result. Go
to the result zone and in the \emph{Criteria} row enter the condition for the
selected field.

\textit{Example:}
\begin{description}
    \item{> 150 - } we will presume that we entered the above criteria for a numeric field. Or:
    \item{= 'CPU' - } for a character field.
\end{description}

If you don't want a field to be included in the result and you dropped it into
the result area just for adding a selection criteria on it, mouse click on 
the Yes or No label in the \emph{Return} row.

In order to sort the results on a field, mouse click on the 'unsorted' label in
the \emph{Sort} row.

If you want to remove a field from the result zone, click on it's name and
then hit the \emph{Delete} key.

Pressing the \emph{Show SQL} button will display the SQL command that will be
build from the current tables and result columns. Clicking on the canvas will
make it dissapear and the table layout will be displayed again.

Check the query execution by pressing on the \emph{Execute SQL} button. If the
query has been executed without error, a query viewer will be displayed and
you will be able to see the selected rows. When everything is ok, save the
query command to the query builder by pressing the \emph{Save to query builder} button.
