Creating forms

Paradox lets you create and open forms. You can specify the way forms look and create multi-page forms. Once you create a form's design, you can run the form and use it to edit table data. Any change you make to the data in the form is reflected in the table. You can also print a form's design and deliver forms to others.

In the section, you'll learn about

  creating a form
  
  opening forms
  
  changing form color
  
  adding and deleting form pages
  
  copying form pages
  
  changing the display of a form page
  
  choosing form properties
  
  moving around a form
  
  changing tab order
  
  running forms
  
  printing forms
  
  delivering forms
  
Creating a form

With Paradox, you can create blank forms or use the form Form Expert to assist you in building a form. You can also create a form by copying the contents of another form. Forms allow you to display your table data and they can also be used to enter data into a table.

To create a blank form

1	Click File  New  Form.

2	Click Blank.

Note

  When you create a blank form, it is placed in the design window and is not bound to a table. It contains only a single page for forms a report header and footer, page header and footer, and record band for reports.
  
To create a form by using the Form Expert

1	Click Tools  Experts.

2	Double-click the Form icon.

3	Follow the instructions in the Form Expert.

To copy of form

1	Click Tools  Project Viewer.

2	Click the Forms icon.

3	Right-click a form in the right-hand panel of the Project Viewer and click Copy.

4	Right-click in the right-hand panel of the Project Viewer, and click Paste.

Paradox creates a copy of the form with the same name and with "Copy of" placed in front of the name.

Opening forms

Paradox lets you open forms for editing or viewing. You can also open a form that is based on a report, which creates a new form using the contents of the report's record band, including design properties and page breaks. Because forms do not use the banded layout that reports do, objects in group, page, or report bands are not included in the new form design.

You can also open a form that uses the contents of another table.

To edit a form

1	Click File  Open  Form.

2	Choose the drive and folder where the form is stored.

3	Click the form.

4	In the Options area, enable the Edit the form design option.

5	Click Open.

To view a form

1	Click File  Open  Form.

2	Choose the drive and folder where the form is stored.

3	Click the form.

4	In the Options area, enable the View the form option.

5	Click Open.

To open a report as a form

1	Click File  Open  Report.

2	Choose the drive and folder where the report is stored.

3	In the Options area, enable the Open as a form check box.

Note

  Some objects behave differently in forms and reports. For example, calculated fields and summary fields look at data differently; therefore, you might need to modify them to get the correct results. Summary fields located in the record band of a report work correctly in a form. If the report design includes a page break in the record band, Paradox creates a multi-page form.
  
To open a form that uses a different table

1	Click File  Open  Form.

2	Choose the drive and folder where the form is stored.

3	Click Change table.

4	Choose the drive and folder where the table is stored.

5	Click OK.

6	Click Open.

Changing form color

When creating a form, you can customize the way it looks by specifying the form background and page color.

To change form background color

1	With a form open in the form design window, click Format  Properties.

2	Click the General tab.

3	Click a color on the color palette.

If you want to create a custom color, click Add custom color.

You can also	

Apply a pattern to a form background	Click the Pattern tab and click a pattern on the Pattern style palette.

Choose a pattern color	Click a color on the Pattern color palette.

To change form page color

1	With a form open in the form design window, click a form page.

If a form page is selected, selection handles will display around the page.

2	Right-click the form page, and click Properties.

3	Click the General tab.

4	Click a color on the color palette.

If you want to create a custom color, click Add custom color.

You can also	

Apply a pattern to a form background	Click the Pattern tab and click a pattern on the Pattern style palette.

Choose a pattern color	Click a color on the Pattern color palette.

  
  
Adding and deleting form pages

Paradox lets you add new pages to a form. When you add a page, it is added to the end of the existing form pages. You cannot add a blank page between existing pages, but, you can add a page and then move the pages to change their order. For more information about rearranging page order, see "Changing the display of a form page." You can also delete form pages.

To add a page to a form

  With a form open in the form design window, click Insert  Page.
  
Tip

  When you work with multi-page forms, you can see all the pages of the form on the screen at the same time by clicking View  Zoom  Best fit.
  
To delete a form page

1	With a form open in the form design window, choose a page.

If a form page is selected, selection handles will display around the page.

2	Click Edit  Delete.

Tip

  You can delete a form page in the Object Explorer by choosing the page and clicking Edit  Delete.
  
Copying form pages

Paradox lets you copy a form page and place the page's contents in another page in the form or in another form.

To copy a form page

1	With a form open in the form design window, click in the white space of the page you want to copy.

If a page is selected, selection handles display around the page's border.

2	Click Edit, and click one of the following:

  Cut-relocates the data to the Clipboard
  
  Copy-duplicates the data and places it in the Clipboard
  
3	Select the location where you want to paste the page.

When pasting a page, the pasted page is inserted before the page you select.

4	Click Edit  Paste.

Tips

  You can copy a form page in the Object Explorer by choosing the page and clicking Edit  Copy.
  
  You can paste a form page in the Object Explorer by copying or cutting a page and clicking Edit  Paste.
  
  You can cut a form page in the Object Explorer by choosing the page and clicking Edit  Cut.
  
Changing the display of a form page

Paradox lets you change the way form pages are displayed. You can rotate form pages, which moves a selected page to the form's last page position. You can stack the pages to display them one on top of another. You can also display the pages vertically down the screen or horizontally across the screen.

To rotate form pages

1	With a form open in the form design window, click in the white space of the page you want to rotate.

If a page is selected, selection handles display around the page's border.

2	Click Format  Rotate pages.

To stack form pages

1	With a form open in the form design window, click in the white space of a page.

If a page is selected, selection handles display around the page's border.

2	Click View  Tile pages  Stack pages.

To display form pages vertically

1	With a form open in the form design window, click in the white space of a page.

If a page is selected, selection handles display around the page's border.

2	Click View  Tile pages  Top and bottom.

To display form pages horizontally

1	With a form open in the form design window, click in the white space of a page.

If a page is selected, selection handles display around the page's border.

2	Click View  Tile pages  Side-by-side.

Choosing form properties

When you design a form, you can specify that the form open as a window when you run the form. You can also add scroll bars to the form window and specify to automatically size the window to fit the page size of the form. If you specify that a form open as a window, it can be moved like any other dialog box, but cannot be resized by the person who runs the form.

You can also specify that the form open as a dialog box when it is run and add a title to the dialog box.

For the settings you specify to take effect, you must save the form, close the form design window, and open the form in the form window.

To have a form open as a window

1	With a form open in the form design window, click Format  Window style.

2	In the Window style area, enable the Window check box.

If you want to add a title to the form window, type a name for the form window in the Title box.

Tip

  You can have the standard Paradox form window menu automatically display when you open a form by enabling the Standard menu check box. The standard menu check box is enabled by default. If you create a menu using ObjectPAL, and want your form to use it, disable the check box. This applies mainly to multi-form applications. For more information about customizing forms using ObjectPAL, see "Form: A window to data."
  
To add scroll bars to a form window

1	With a form open in the form design window, click Format  Window style.

2	Enable the Window check box.

3	In the Window properties area, enable any of the following check boxes:

  Vertical scroll bar
  
  Horizontal scroll bar
  
Note

  After you change the window properties of a form, you must save the form and reopen it to see the changes.
  
Tip

  You can specify that scroll bars be automatically added to new forms and reports by clicking Tools  Settings  Preferences, clicking the Advanced tab, then enabling the Use scroll bars in form windows by default check box.
  
To size the window to fit the page size of the form

1	With a form open in the form design window, click Format  Window style.

2	In the Window style area, enable the Window check box.

3	In the Window properties area, enable the Size to fit check box.

Note

  The effect of enabling the Size to fit check box may not be apparent unless your page size is smaller than the size of the screen display. Before enabling Size to fit, you can adjust the page size to be as small as it can be without removing any existing objects.
  
To have a form open as a dialog box

1	With a form open in the form design window, click Format  Window style.

2	In the Window style area, enable the Dialog box check box.

3	In the Frame properties area, enable one of the following check boxes:

  Dialog frame - displays the dialog box as a standard Windows dialog box frame
  
  Border - displays the dialog box with a border instead of the default Windows style
  
  Thick frame - displays the dialog box with a thick border instead of the default Windows style
  
Notes

  The border, colors, and other settings are set from the Windows Control Panel.
  
  After you change the window properties of a form, you must save the form and reopen it to see the changes.
  
Tips

  You can prevent users from working anywhere else in Paradox until the form is closed by enabling the Modal check box.
  
  You can let users click the form to activate the form without changing its focus by disabling the Mouse activates check box. This option is not available if the Modal check box is enabled.
  
To add a title to the form dialog box

1	With a form open in the form design window, click Format  Window style.

2	In the Window style area, enable the Dialog box check box.

3	In the Window properties area, enable the Title bar check box.

4	Type a title in the Title box.

5	In the Title bar properties area, enable any of the following check boxes:

  Control menu-displays the control menu in the top-left corner of your dialog box
  
  Minimize button-displays a minimize button in the top-right corner of the dialog box
  
  Maximize button-displays a maximize button in the top-right corner of the dialog box
  
Moving around a form

Paradox provides several ways to move around a form. If a form includes a table, the mouse can be used to move around the table records; however, the navigation buttons, scroll bars, and cursor control keys can also be used. The cursor-control keys are the most reliable way to move among records on a form. You can also move around fields on a form, table objects on a multi-table form, and move directly to a form page.

To move around table records on a form

To move	Do the following

To the first record of the table	Click Record  Go to  First.

or

Press CTRL +F11.

Up one record set (the number of records displayed in the table window)	Click Record  Go to  Previous set.

or

Press SHIFT + F11.

To the previous record of the table	Click Record  Go to  Previous.

or

Press F11.

To the next record of the table	Click Record  Go to  Next.

or

Press F12.

Down one record set (the number of records displayed in the table window	Click Record  Go to  Next set.

or

Press SHIFT + F12.

To the last record of the table	Click Record  Go to  Last.

or

Press CTRL + F12.



You can also	

Move to the first record of the table	Click  on the toolbar.

Move up one record set (the number of records displayed in the table window)	Click  on the toolbar.

Move to the previous record of the table	Click  on the toolbar.

Move to the next record of the table	Click  on the toolbar.

Move down one record set (the number of records displayed in the table window)	Click  on the toolbar.

Move to the last record of the table	Click  on the toolbar.

To move among fields on a form

To move	Do the following

To the next field in a table	Press TAB.

To the previous field in a table	Press SHIFT + TAB.

Note

  You can change the tab order. For more information about tab order, see "Changing tab order."
  
To move among table objects on a multi-table form

To move	Do the following

Forward among the table objects	Press F4 (Super Tab).

Backward among the table objects	Press F3 (Super Back Tab).

Backward between pages of a multi-page form	Press SHIFT + F4.

Forward between pages of a multi-page form	Press SHIFT + F3

To move directly to a form page

1	Click View  Page  Go to.

2	Type a number in the Page number box.

Tips

  You can move to the next page by pressing SHIFT + F4 and move to the previous page by pressing SHIFT + F3.
  
  In the form design window, you can use the scroll bars to move through the pages of a form, unless you have the pages stacked. After you scroll to a page, you must select the page to make it active.
  
Changing tab order

When you are designing a form, the objects you place on the form tab in the order in which you place them. The tab order specifies the order in which you move around objects on a form when you press Tab. If you move the objects around, the original order in which you placed them might no longer make sense. However, Paradox allows you to change the tab order while creating your form or report.

The tab order that is set while designing a form is not the tab order used when you run the form, but you can change the run time tab order and include buttons in the run time tab sequence.

To change the tab order

1	With a form open in the form design window, click the object you want to be first in the tab sequence.

2	Click Format  Order  Bring to front.

If you want to place the object at the end of the tab sequence, click Format  Order  Send to back.

Note

  The tab order that is set while designing a form is not the tab order used when you run the form. For information about how to change the run time tab order see "To change run time tab order."
  
To change run time tab order

1	With a form open in the form design window, right-click the object for which you want to change the run time tab sequence, and click Properties.

2	Click the Run time tab.

3	Enable Choose the next tab stop check box.

4	From the list, choose the object you want next in the tab sequence from the list.

To include buttons in the run time tab sequence

1	With a form open in the form design window, right-click the object for which you want to change the run time tab sequence, and click Properties.

2	Click the Run time tab.

3	Enable Tab stop check box.

Note

  If you do not enable the Tab stop check box, the object is bypassed in the tab sequence. Individuals who use your form can still use the mouse to select a button, OLE object, or graph, but they cannot use the mouse to select a field object.
  
Tip

  To ensure that all objects are included in the tab order, you should add objects to the tab order as you add them to the form.
  
Running forms

Once you create a form, you can run the form to enter data in the form. You can run a form when opening the form or ruin it from the form design window.

You can also run a form that uses data from another table or from a query. This is useful, for example, if you have two types of vendors that you want to keep separate, but the table structure for each vendor is identical. You can design a form for the first vendor table and, instead of creating an identical form for the second table, open the form using the second table.

If you run a form and want to see the table on which it is based, you can view the form's source table.

To run a form

1	Click File  Open  Form.

2	Choose the file and folder where the form is stored.

3	Enable the View the form check box.

Notes

  When you run a form, multi-record objects can display more than one record of a table at a time in a non-tabular format.
  
  Table frames display as many records of each table as fit in the space you allotted. However, you can navigate through the records to show any that don't fit in the display.
  
To run a form from the design window

  With a form open in the form design window, click View  View data.
  
If you prefer, you can run a form by pressing F9 on the keyboard.

To run a form that uses data from a different table

1	Click File  Open  Form.

2	Choose the file and folder where the form is stored.

3	Click Change table.

4	In the Select replacement table dialog box, choose the file and folder where the table is stored.

5	Click OK.

6	Click Open.

To view a form's source table

1	Run a form.

2	Click View  Table view.

Note

  When you view a form's source table, you are viewing the source table of a single-table form or the master table of a multi-table form.
  
Printing forms

Although forms are intended for use primarily as screen-based documents, you can to print a form. You can print a form's design or a form's records.

When you print a form's records, only the current record is printed. If you need to print all of the form's records, print a report. For more information about printing reports, see "Printing reports."

To print a form design

1	With a form open in the form design window, click File  Print.

2	In the Destination area, choose a printer from the Name list box.

If you want to print your form design to a file, enable the Print to file check box.

3	In the Print range area, enable the Full file option.

If you are printing page numbers, type the number of the first page in the Number on first page box.

4	In the Copies area, type the number of copies you want to print in the Number of copies box.

If you are printing multiple copies, you can collate the pages by enabling the Collate check box.

5	Choose printer settings from the Settings list box.

6	Click Print.

You can also	

Preview a print job from the Print dialog box	Click Preview.

Print a range of pages	In the Print range area, enable the Pages option. Type a page range in the Pages box.

Print pages in reverse order	In the Copies area, enable the Print in reverse order check box.

Tips

  You can change your printer properties in the Print dialog box by clicking the Main tab and clicking Properties.
  
  You can check print history and status in the Print dialog box by clicking the Main tab and clicking Status.
  
To print a form's records

1	Open a form.

2	Click View  Edit data.

3	Click File  Print.

4	In the Destination area, choose a printer from the Name list box.

If you want to print the form design to a file, enable the Print to file check box.

5	In the Print range area, enable the Full file option.

If you are printing page numbers, type the number of the first page in the Number on first page box.

6	In the Copies area, type the number of copies you want to print in the Number of copies box.

If you are printing multiple copies, you can collate the pages by enabling the Collate check box.

7	Choose printer settings from the Settings list box.

8	Click Print.

Notes

  Form pages won't be numbered unless you specify the page number, number of pages fields, or both on each page.
  
  If you designed the form for the screen, the fonts that display on the printed output might not match those used on the screen. This depends on whether your screen fonts and printer fonts match.
  
Delivering forms

Delivering a form allows others to use the form, but not change its design or source code. A delivered form cannot be opened in the form design window, and therefore cannot be changed.

When others use your form, they must also have access to all the tables in the data model, along with any indexes and referential integrity files. The easiest way to make a set of tables, forms, and related files portable is to use an alias.

When you deliver a form, a copy of the form with all source code removed is created. Buttons and other objects still work exactly the way you designed them.

To deliver a form

1	Open a form in the form design window.

2	Click Format  Deliver.

Paradox saves a copy of the form with an .fdl extension.

Note

  You can still change the original form (the one with the .fsl extension) and then deliver the form again. Your code is not lost-it's protected. 
  



