Computer Act!ve - UK (2022-05-11)

(Maropa) #1

36


The label for the DateAcquired field is overlapping the Genre field

Use the toolbar at the bottom of the screen to save and navigate
records in a form

How I use databases


How do you use databases? Please let us know:
[email protected]

My DVD collection is in disarray, but my recipes are neatly typed
and categorised, allowing me to search by cooking time or
ingredients when lacking inspiration. I haven’t quite got as far as
logging when each recipe was used: nobody needs to get that
technical when making sure they have a balanced diet!
Nik Rawlinson

3


Design a form
Click ‘Forms’ in the sidebar,
followed by ‘Use Wizard to
Create Form...’. On the first screen of
the Form Wizard, click FilmTitle, then
press Shift while clicking Stars to select
everything aside from ID (because the ID
field is only relevant to the database itself,
not you as a user). Click > to move your
selection to the ‘Fields in the form’ box,
then click Next twice.
Click the second option in the
‘Arrangement of the main form section’.
This arranges your fields in a column,
with the Stars block to the right of the
FilmTitle, and a field name above each
box. Click Next. Leave ‘The form is to
display all data’ selected, click Next, then
choose your preferred colour scheme (we
like Bright Blue, with the Field Border
option set to ‘No border’, as shown in the
screenshots below).
Click ‘Next’, then select ‘Modify the
form’ and click Finish. You might want to
tweak the form if, as was our experience,
some of the labels and fields overlap each
other. You can see this in our screenshot
(below left), where the DateAcquired
field is overlapping the Genre field.

You can fix this by clicking the
misaligned object and dragging it to its
new position. If you can’t get it exactly
where you want it, right-click the
misbehaving object, choose ‘Position and
Size’ from the menu, then choose your
positions using the dropdown menus
beneath ‘Position’. You might need to
use a bit of trial and error to get things
exactly aligned.
When you’ve finished, press Ctrl+W to
close the window, then click Yes when
asked if you want to save your changes.

4


Enter your first record
You’re now ready to start logging
your DVDs. Double-click the
form you’ve just designed to open it for
use, rather than editing.
Now fill in the fields, using DD/MM/
YY style for the DateAcquired field;
providing a cinema age rating like U,
PG, 15 and so on for Rating; specifying
the running time in minutes in the
Length field; and devising your own
score out of five for the Stars field. When
you’ve finished, click the save icon on
the toolbar at the bottom (^1 in our
screenshot below), not the top. Then, if

Genre, FilmTitle and DateAcquired^2.
Click the > button^3 and your selection
will be added to the ‘Selected fields’ box.
It doesn’t really matter which order
they’re in, as you can arrange fields in
your form or report, but it makes sense
to reorder them now so they’re more
logically arranged in the table. Click
‘FilmTitle’, then keep clicking the up-
arrow button until it’s at the top of the
list. Click ‘Notes’ and use the down-arrow
button to move it to the bottom.
Click ‘Finish’ and Base will show
your empty table. You’ll notice that an
extra field, called ID, has been added
alongside your selection. This will hold
the unique identifier for each record
which, in its current configuration, you’ll
need to enter yourself. It makes more
sense if Base does this for you, so close
this window to return to the Base home
screen, where your new DVD-Collection
table will appear in the Tables panel.
Right-click it, then select ‘Edit...’.
Click ‘ID’ in the Field Name column,
then, in the Field Properties panel
below, click the dropdown menu beside
AutoValue and select Yes.
Now click ‘Text [VARCHAR]’ in the
column to the right of Length, and pick
‘Integer [INTEGER]’ from the menu. You
need to make this change so that film
lengths, which you’ll enter in minutes
without the letter ‘m’ at the end, can be
treated as a number for sorting.
Finally, add a new field: click in the
empty box below Notes, still in the Field
Name column, then type Stars. Click
‘Text [VARCHAR]’ in the Field Type
column beside it, and pick ‘Small Integer
[SMALLINT]’ from the menu. Press Ctrl+S
to save your changes, then close the
window.

(^32)
11 – 24 May 2022 • Issue 631
1

Free download pdf