Using Forms for Data Entry

If your data source is up to it and if you think it's a good decision for your security situation, then you can very easily use forms for data entry.

First note

It helps if you have the following skills too, but that's just for adding more powerful processing:

  • Do anything with SQL (are you the MacGyver of SQL?)

  • Learn to write macros

Second note

graphics/triangle.gif

This depends on your database, of course. Is your security set up so people can just edit it from forms? That might not always be wise. Likewise, data sources based on text files and spreadsheets aren't editable. Though you can save either form as .DBF and then you've got an editable data source.

Third note

The form setup and how it interacts with data sources is weird once in a while. It's not wildly inconsistent but it does help if you kill an occasional chicken.

Adding a Record

  1. Open the form you want to use.

    You might be able to get at it by choosing View > Data Sources and opening the Links section for the data source you're working with. If you or the person who set up the data source was thinking ahead, there'll be a linked data entry form for that data source.

  2. Go to the end of the data source. Do so by using the Last Record icon in the toolbar at the bottom of the work area, or by typing the number of the last record in the Record field. Technically, you don't have to go to the last record, but the new record is created at the end of the table anyway.

    graphics/36inf19.jpg

  3. Click the New Record icon at the bottom of the form.

    graphics/36inf20.jpg

  4. Type the new data in the appropriate fields in the form, as shown in Figure 36-2.

    Figure 36-44. Go to the end of the table and type the data

    graphics/36fig44.jpg

  5. Click the Save Record icon at the bottom of the form.

    graphics/36inf21.jpg

    graphics/36inf22.jpg

    If you're looking at the data source viewer window (View > Data Sources), you can click Refresh above the data source fields to make the change show up.

Deleting a Record

  1. Open the form.

  2. Navigate to the record you want to delete by using the navigation arrows at the bottom of the work area, or by typing the record number in the Record field. You can also search for it; see Searching for Specific Records on page 951.

    graphics/36inf23.jpg

  3. Click the Delete Record icon.

    graphics/36inf24.jpg

Changing a Record

  1. Open the form.

  2. Navigate to the record you want to delete by using the navigation arrows at the bottom of the work area, or by typing the record number in the Record field. You can also search for it; see Searching for Specific Records on page 951.

    graphics/36inf25.jpg

  3. Before you type anything new: the changes take place as you type them.

    Type the new data in the fields; for instance, to change an address, just type the new address over the old address in the address field.

    graphics/36inf26.jpg

  4. Just to be sure, click the Save Record icon at the bottom of the form.

    graphics/36inf27.jpg

Trying to Enter Data in a Field That Doesn't Want It

Having problems entering additional text in a field that seems to be fine for all the other records? Odds are it's just a table design issue: maximum field length. How to solve this? Easy, just edit the table definition and increase the maximum field size. See Creating New Tables and Fields for Any Data Source Except Text Files and Spreadsheets on page 907 for more information.

You will also need to modify the size of the field in your form. Right click on the field, choose Control, then in the Field Length field, and as shown at right change the value to what you entered when modifying the data source itself.

graphics/36inf28.jpg



OpenOffice. org 1.0 Resource Kit
OpenOffice.Org 1.0 Resource Kit
ISBN: 0131407457
EAN: 2147483647
Year: 2005
Pages: 407

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net