Novell Home

Novell Connection Magazine Home

March 2008

Features

A
Better Base

Building your carefree database in OpenOffice.org—made simple with forms
Tech Talk 6 by BrainStorm, Inc.

  • Show Menu for Current Issue

Editing a Form

If, like me, you open a form and find that it's really not designed the way you'd hoped, like the field for a serial number is too short or you decide to change the name of a field, you can edit it quite easily, even if you've already begun entering data. This is nice for a variety of reasons. For example, Base dictates that table fields be one—and only one—word; but that's no reason to make the person doing the data entry look at a field that reads SerialNumber instead of Serial Number all day long.

To edit a form:

  1. Open the database that contains the form you want to edit.
  2. Select Forms from the pane on the left.
  3. Right click the desired form and select Edit.
  4. The form will open, displaying only the fields and labels; all data will be hidden.
  5. Edit away.

Here are a few important edits you'll likely have to make at some point:

Changing a Field Label: Move your cursor over the label you want to change and Ctrl-click the left mouse button. The label alone will be selected. Right click the label and select Control. The properties box for the label field will open, in which you can enter a new name in the Label field, change the font or alignment of the label, and more. (See Figure 6—Labelfield Properties.) Click the Exit X in the top right when you're finished. Save your changes.

Resizing a Field: Move your cursor over the field you want to resize and Ctrl-click the left mouse button. The field alone will be selected. Move your cursor to one of the green handles, press the shift key, and use the mouse to resize the field as desired. (See Figure 7—Resizing a Field.) Save your changes.

Moving a Field: Move your cursor over the field you want to move. Click and drag the field with its label to the desired position on the form. Save your changes.
Beware, though! Moving fields can cause problems on occasion. Let's say, for example, that your original form contained these fields in this order: title, first name, last name, address, state, city, zip code. You didn't realize when you set up the form that you had put the field for state before the field for city, so you edit the form by moving the fields around.

But when you start entering data in the form and press Tab after each field entry, the cursor still moves from title to first name to last name to address to state to city, etc. Your problem wasn't really solved. That's because moving a field in this fashion also requires resetting the tab order.

Resetting the Tab Order: Move your cursor over the field in question and Ctrl+click the left mouse button. The field alone will be selected. Right click and select Control. Change the number in the Tab order field under the General tab to reflect the correct location.

If the state and city were reversed, as described above, you'd change the 6 in the City field to a 5 and the 5 in the state field to a 6. Close the window and save your changes.

Changing the Field Type: Move your cursor over the field in question and Ctrl+click the left mouse button. The field alone will be selected. Right click and select Replace with. Make your selection from the context menu that appears. (See Figure 8—Field Types.) If you change the field type, it's likely that you'll also want to edit the field's appearance to ease data entry. For example, you can select the field alone, right click, select Control, and then make edits under the General tab that would add things such as calendars, formatting parameters for currency and dates, and so on. (See Figure 9—Creating a Date Field.) Close the window and save your changes.

Where Did It Go . . . and What's Next?

Once you spend a few hours learning just what a form can do, save your form again. Saving is key in Base. After saving a form and returning to the main database screen, always click the Save button on the toolbar; otherwise, you risk returning to the program and finding that your form no longer exists. The form is accessible only through the database with which it is associated.

For now, especially if you're new to database creation, I recommend stopping here and practicing for a while. It may not seem like you've learned much, but you're actually well on the way to having a working database with simple forms for data entry and simple tables populated with basic data. I use the terms simple and basic because databases with multiple and many-layered relationships can be tricky. (I suppose it's really true that no relationship is easy.) So, practice away and if you're one of those just beginning to work with databases, when you've mastered these skills, check out the article on Subforms and other deeper relationships in the previous article. Those will take you to an entirely new level.

  • Figure 1

    This is the main table in our IT Inventory Database. Several of the fields in the table, such as those for the Serial Number, Vendor ID, Employee ID, and Condition, are linked to other tables.

  • Figure 2

    This table is a secondary table in the IT Inventory Database. It is linked to the main table through the Employee ID field.

  • Figure 3

    Like the User/Employee Table, the Vendors table is secondary to the main table. It is linked to the main table through the Supplier ID field, which shares common information with the Vendor ID field in the main table.

  • Figure 4

    If you have only a few tables in a database, with relatively little information needed in each table, you can easily populate your tables by opening them and entering the data by hand. Simply tab over from field to field. Remember to save your data before closing the table.

  • Figure 5

    The Form Navigation Toolbar employs VCR-like buttons to help you scroll through each record. It is also the place to go to save, delete, undo, or further control a record while entering data.

  • Figure 6

    Youll likely want to change the name of many of the labels on your forms. This is because the label names come directly from your tables, which require that a field be named with only one word.

  • Figure 7

    After creating a relationship, a line will display between the common fields, indicating the type of relationship. This is a one to one relationship.

  • Figure 8

    Selecting a field type for each field in your table will help you create tables that provide the specific information you want to relay,

  • Figure 9

    By selecting a field, right clicking, and choosing Control, the Properties box displays. Here you can make changes to improve data entry. This image shows that the user has made changes that will place a drop-down arrow in the field, add parameters for minimum and maximum date entries, and set the date format to MM/DD/YY.



© 2014 Novell