text
stringlengths 11
3.5k
| source
stringclasses 1
value |
---|---|
Checks are not used in filters, and records are displayed as if a Check Plus is set on every field. Although filters cannot have multiple lines such as those used in queries,the equivalent to multiple lines is the OR keyword. The % (equivalent to mod) operator is supported in filters but not inqueries. This operator only works on SQL tables. The operator precedence is slightly different from queries. In all other respects, the types of expressions you can use in filters are thesame as those used in queries. Although filtering a table gives you a new table view, it doesnt create anew table. Queries, however, create an Answer table that you may thenrename and save. Filtering a table Once you create a table, you neednt view it in its entirety all the time. Paradox lets you pick and choose which records you want to display. You canview the entire table in a different order by choosing a secondary index vieworder or you can select particular records by defining one or more fields. Youcan also set a range of values. To filter the view of data in a table 1Open a table. 2Click Format, Filter. 3Enable the Order By check box to order records according to the selectedindex. 4Select the index by which you want the filter to sort. An asterisk (*) precedes the primary index. If the table is keyed or has secondary indexes defined, you can choose which index Paradox uses tosort. 5T ype the conditions for the records you want to see in the box beside eachfield listed in the Filters On Fields section. To specify a range when filtering the view of data in a table 1Follow steps 1-5 above. 2In the Filter Tables dialog box, click Range. 94 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
3In the Set Range for Index dialog box, do one of the following: T o specify an exact match, type the value you want to find in the Field Value box. You can only filter records based on the values in the keyfield(s) of the index you chose in step 3 above. T o specify a range of values, enable the Set Range check box. 4T ype the beginning and ending (if applicable) values in the Field Valueboxes. 5Click OK. For example, the following filter range will display all records with Order No. 1000. 00 to 1020. 00: To remove a table filter 1Open a table. 2Click Format, Filter. 3In the Filter Tables dialog box, delete the filter condition text. Filtering on special characters If you are filtering on special characters, you must precede the number orliteral value that can be interpreted as an operator (like , /, \,-, +, =, etc. ) with a backslash(\). In the OPAL method setgenfilter(), the filter criteria is put into a string and parsed to pick out numbers and operators for calculations. If the number or operator in the filter needs to be interpretedliterally, it needs to be preceded by a backslash(\). Tables 95 | 292806769-Paradox-9-Eng.pdf |
For example, to filter a table with the following records: 1st Base 1st Love 2nd Base 3rd Base and retrieve only those that start with 1st, the filter would look like the following: filter = \\1st.. One backslash for the number and another to indicate the first backslash isnot an escape sequence. You can only specify a range of values based on the field(s) defined in theprimary (key) or secondary index you selected. If you choose a compositeindex (or key), you can set ranges for multiple fields within the index. Formore information, see Setting ranges on a composite index on page 98. Enable the Set Range check box in the Set Range for Index dialog box tofilter for partial values in alpha fields (customer records with first namebeginning with A-J). You can enter A as the beginning range and J as theending range. If you enable the Set Range check box without first placingthe insertion point in a text box, Paradox automatically chooses the lastfield for which you have specified a value as the field for which you wantto define the range of values. When you filter a table, the table data is not lost, you are just modifyingwhat data you see in the table. When you delete the filter condition,Paradox re-displays all records from the table. Creating and removing field filters Just as you can filter particular records in a table, you can filter individualfields and therefore view only those records contained in that field. Once youhave finished with the view, you can remove the filter. To filter a field 1Right-click the field you want to filter in a Table, Form, or Report Design Window and click Filter. 96 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
2In the Field Filter dialog box, type the value to display. Paradox displays only those records where the selected field contains the value you specified. To remove a single-field filter 1Right-click the field you want to filter in a Table, Form, or Report Design Window and click Filter. 2Delete the text in the Field Filter dialog box. Setting either/or conditions in table filters You can use either/or conditions to filter the table data. Suppose you want tosee customers that are either in Florida or the Bahamas. If you type Bahamasin the Country box and FL in the State/Prov. box, Paradox displays all of thecustomers that are in both the state of Florida and the Bahamas. (This isequivalent to an AND query. ) Since no records can meet that condition,Paradox shows no records in the filtered view. T o tell Paradox you want tosee customers that are located either in Florida or the Bahamas, you mustspecify OR conditions across fields. You can do this by referring to one fieldfrom the text box of another field. To set either/or conditions 1Open a table. 2Click Format, Filter. 3In the appropriate field, type in the either/or condition. For example, to see customers that are either in Florida or the Bahamas, type FL or Country=Bahamas in the State/Prov. text box. When referring to a field name that contains a space or special characters, such as those listed in Filtering tables on page 91, you must enclose thefield name in brackets. For example, the condition City = Venice or[Customer No. ] = 1560 is valid, but the condition City = Venice or Customer No. = 1560 is not. Furthermore, the condition [Sale%] < 20 isvalid, but the condition Sale% < 20 is not. It doesnt matter which text box you use to specify filter conditions. Youcould type Bahamas or [State/Prov. ] = FL in the Country field. You couldeven type [State/Prov. ] = FL or Country = Bahamas in the Name textbox (or any other text box). Tables 97 | 292806769-Paradox-9-Eng.pdf |
Filtering tables by sorting on secondary indexes T o view a keyed Paradox table in a different order from that specified by the primary index, you can use the Filter command to access and sort the tablebased on any secondary indexes you have defined for the table. To use the Filter command to sort on a secondary index 1Open a table, form, or report. 2Click Format, Filter. 3In the Filter Tables dialog box, enable the Order By check box. 4Click an index from the list below the Order By check box. Paradox creates a view of the tables data sorted by the values in the secondary index that you selected. Setting ranges on a composite index When filtering a table, you can only specify a range of values based on thefield(s) defined in the primary (key) or secondary index you selected. If youchoose a composite index, you can set ranges for multiple fields within theindex. The composite index determines the order of fields shown in the Set Range for Index dialog box (where you set the range of data you want toview). When setting ranges on a composite index, you must select a single continuous set of records on the chosen index. You do not have to specify arange for every field of the index, but you cannot skip over a field. To set a range on a composite index 1Open a table. 2Click Format, Filter. 3Select the composite index by which you want to filter the table. 4Click the Range button. 5T ype the value in the Field Values box for each field. Or, if you want to seta range, ensure you adhere to the following rules: If you have a three-field index, you can set a range on the first field but not the second or third. You can set a range on the first and second fields but not the third. You cannot set a range on the first and third fields, skipping thesecond. 98 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
You cannot use a composite index on a d BASE table to set a range. You can, however, use an expression index. You can set an exact match,inexact match, or partial range on an expression index. For moreinformation, see Creating a d BASE expression index in the Referencesection of the online Help. You can specify exact matches and range matches on the same compositeindex, but you can use a range match only on the last of the fields youdefine a match for. Using the example of the three-field index, observe thefollowing rules: You can set an exact match on the first and second fields, and a range match on the third. You can set an exact match on the first field, a range match on thesecond, and leave the third blank. You can set a range match on the first field, and no range on the secondor third. You cannot set a range match on the first field and an exact match onthe second or third. Setting ranges or filters on a quick form Suppose you set a range or filter from the Table window and then create aform. Even if youve set a different range or filter for use on the form,Paradox uses the tables setting in both windows because the table wasopened first. Likewise, if you open a form first, then click View, Table View to open a Table window, the table will use the forms setting. Paradox uses the settings of thewindow you open first. To save a filter or range setting within a form or report 1With a table open, click T ools, Quick Design, Quick Form (or Quick Report). 2Click Record, Filter. 3Click the Range button. 4Enable the Set Range check box. 5T ype in the field values for the range and click OK. Tables99 | 292806769-Paradox-9-Eng.pdf |
6Click OK. 7Click View, Design Form. 8Click File, Save As. 9T ype a name for the form or report in the File Name box and click Save. You cant save a range setting within a table. Viewing indexed SQL tables in a different order You can use the Filter Table command to sort an indexed SQL table using any of the indexes you have defined for the table. To view an indexed SQL table in a different order 1Open a table, form, or report. 2Click Format, Filter. 3In the Filter Tables dialog box, enable the Order By check box. 4Click an index from the list below the Order By check box. Paradox displays the tables data based on the sort criteria defined in the index. T o specify a case-insensitive as opposed to a case-sensitive view order,you must first define the index with the specifications you want. Sorting tables A very important feature of any database program is the sorting operation. With Paradox, you have the option of sorting the table in many differentways. Although a primary key determines a field on which to sort, Paradoxlets you maintain this key (for linking purposes) yet sort on another field bymoving it to the Sort Order list box. When you sort a table, Paradox displays the table based on the sort criteria you specify. Paradox cannot sort on the following field types: BLOB, BCD, logical, or bytes fields in Paradox tables Memo, binary, OLE, or logical fields in d BASE tables 100 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
Fields of these types are displayed in the Fields list, but are dimmed and cannot be selected for placement in the Sort Order list. Sorting keyed tables By definition, the key determines the physical location of the records in thetable. If a table is keyed, Paradox provides you with two ways to sort thetable differently. You can create a maintained secondary index which displaysrecords based on different sort criteria without changing the physical locationof the records in the table. Or, to change the physical location of the recordsin the table, you can sort the keyed table to a new (unkeyed) table; theoriginal table remains unchanged. Sorting unkeyed tables If a table is not keyed, records appear in the table in the order in which youentered them. When you sort an unkeyed table, you change the actuallocation of the records in the table. You can sort an unkeyed table to itself, orcreate a new sorted table, leaving the original intact. For d BASE tables, thedefault order for records is chronological; for Paradox tables, it depends onhow they are entered positional. Sorting on a network When you sort tables in a multi-user environment, Paradox automaticallyplaces a lock on the table you are sorting. Other users cannot modify itscontents or structure. If another user has a lock on the table, you will not beable to begin sorting until that user finishes working with it. When you sortto a new table, Paradox automatically places a lock on that table as well as theoriginal table for the duration of the sort. You cannot sort SQL tables. Sorting a table Paradox sorts a table according to the sort criteria you specify. When you enable the Sort Just Selected Fields check box, Paradox sorts only on the fields that appear in the Sort Order list. All the fields of the sourcetable are included in the resulting sorted table, but they are not sortedbeyond the fields listed in the Sort Order list. If two or more records haveidentical values in these fields, Paradox cannot sort those records and placesthem in the table as a group, but unsorted within the group. When you do not enable this option, Paradox performs the sort first on the fields in the Sort Order List, and then, if there are two or more records with Tables 101 | 292806769-Paradox-9-Eng.pdf |
identical values in their sorted fields, on the fields remaining in the Fields List (in the order in which they appear). To sort a table 1Open a table. 2Click Format, Sort. 3Click the first field on which you want to sort the table from the Fieldsbox. 4Click the right arrow. 5Click the Sort direction button to define whether you want to sort inascending (+) or descending (-) order. 6Do one of the following: If the table is keyed, a key icon is displayed in the Sorted table section and the Same table option is grayed out. T ype a name for the new tablein the New Table box. If the table is not keyed, enable the Use Existing Table check box tosort the table based on the new sort criteria, or enter a name for thenew table in the New Table box. Paradox will create a new table basedon the sort criteria without changing the original table. 7Enable the Sort Just Selected Fields check box if you want Paradox to sortonly on the fields listed in the Sorted Field Order box. 8Enable the Display Sorted Table check box if you want Paradox toautomatically display the sorted table. You do not have to put all the fields from the Fields list in the Sorted Field Order list. Paradox adds any fields you do not explicitly put in the Sort Order list to the end of that list before performing the sort (unless youhave enabled Sort Just Selected Fields). Paradox includes all fields in theresult (whether the result is the same or a new table). If you do not add any fields to the Sort Order list, Paradox sorts the tablein the order of the fields in the Fields list. If you enable Sort Just Selected Fields, you must place at least one field in the Sort Order list. 102 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
Sorting an Answer table You can sort Answer tables from queries. To sort an Answer table 1Click the Query Window to activate it. 2Click Query, Properties. 3Click the Sort tab. 4Click the Right Arrows button to move Answer table fields from the Answer Fields box to the Sort Order box in the order you want them tosort. When you run the query, the Answer table is sorted in the order youspecified. For more information, see Querying your database on page 309. Restructuring tables You can modify any aspect of a table at any time. Before restructuring a table,make sure no forms or reports that use the table in their data model areopen. If you or any other user (in a multi-user environment) have such adocument open, you will not be able to restructure the table. When restructuring a table, you can do a number of things, including:add, delete, and rename fields add or remove key fields create or remove validity checks create or modify referential integrity relationships change field types repair damaged tables establish secondary indexes add or remove passwords add or remove table lookups view dependent tables Tables 103 | 292806769-Paradox-9-Eng.pdf |
If fields are removed from a table when you restructure it, any corresponding field objects in forms or reports become undefined. When you return to theform or report, you can redefine them. Restructuring on a network When you restructure a table on a network or with more than one session of Paradox open, Paradox automatically places a lock on the table. This meansother users cannot access the table during the restructuring. If another application has started an operation using the table you want to restructure, you cannot begin restructuring until that application finishesworking with the table. Warnings for restructuring When you restructure a table, you can make changes that could result in theloss of data. Changes such as shortening field sizes, creating validity checks,or changing field types can cause existing data to become invalid. Wheneverthis is the case, Paradox opens the Restructure Warning dialog box uponleaving the Restructure Table dialog box. Temporary tables created during restructuring Restructuring sometimes results in the creation of temporary tables, such asa Problems table, that Paradox uses to store records that are incompatiblewith the table as youve restructured it. Paradox numbers these temporary tables consecutively (up to 99) and stores them in your private directory. For example, if you restructure twice, andboth operations cause data loss, Paradox creates both a Problems and a Problem1 table. T emporary tables are deleted at the end of a session. If you do not want a temporary table deleted at the end of a session, you must rename it. Alltemporary tables are stored in your private directory (:PRIV:). KEYVIOL. DB tables If you add a primary key to a table that was previously unkeyed or haddifferent keys, you might cause key violations. You might also rearrangefields so that the key fields are no longer the first consecutive fields in thetable. This means data already entered into the table violates the rulesestablished by the key. Paradox deletes key-violating records from your table to a temporary table called KEYVIOL. DB, located in your private directory. You can change therecords in KEYVIOL. DB so they comply with the key requirements, and 104 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
then add them back to your original table using Tools, Utilities, Add. For information about adding records, see Adding records on page 131. You cannot change a tables type. For example, you cannot change a Paradox table into a d BASE table when you restructure. You can click T ools, Utilities, Copy to copy a table of one type into a table of anothertype. For more information, see Copying tables on page 136. If you restructure a table that was created in Paradox for DOS in such away that Paradox must convert it to a Paradox for Windows table, the Restructure Warning dialog box warns you of the conversion and asks youto confirm it. Creating or removing a key in an existing table A key is a required element for any table that is to be linked to other tables ina relational database. You can add a key to a table you have already created oryou can remove an existing key. To define a field as a key field in an existing table 1Open a table. 2Click Format, Restructure Table. 3If the field on which you want to define the key is not the first field in thetable, click and drag the field to the top of the Field Roster (use thehighlighted line to aid in positioning the field). Otherwise, go to step 4. 4Click the key column to the left of the field for which you want to set thekey. A key appears in the column. To remove a key from a field or group of fields 1Follow steps 1-2 of the previous procedure. 2Click the key icon to remove it. If you delete a key, you must also either delete any secondary indexes, orconvert them to non-maintained indexes. Adding, deleting, and renaming fields When you add, delete, or rename fields to an existing table, you alter anyforms, reports, or queries associated with the table. Tables105 | 292806769-Paradox-9-Eng.pdf |
If you edit a field name in an existing table and that field name appears on any associated design documents, Paradox reconciles the change the next timeyou open a design document. If the field is a labeled field in the designdocument, Paradox does not update the label of the field to the new name. Ifyou have calculated fields in the design document that include the originalfield name, Paradox deletes the calculated field from the design documentwhen you rename the field. To add a field to a table 1Open a table. 2Click Format, Restructure Table. 3Click in the No. column of an existing field to highlight the row. 4Press INSERT to insert a new field above the current field. 5T ype the name of the field in the Field Name column of the Field Roster. 6Click the T ype column and select a field type from the list box. 7T ype an appropriate field size (if required) in the Size column. To delete a field 1Follow steps 1 and 2 of the above procedure. 2Click in the field you want to delete and press CTRL + DELETE. 3Click Save. When you delete a field from an existing table, Paradox unbinds the field from previously created forms and reports. Since a deletion can cause lossof data, Paradox lets you confirm the deletion or cancel the operation. 4Click OK to confirm the deletion or click Cancel to undo the operation. To rename a field 1Follow steps 1 and 2 from the T o add a field to a table procedure. 2Double-click the Field Name column of the field you want to rename andtype the new field name. 106 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
If you add a new field that has a default validity check on it and choose to enforce the validity check on existing data, Paradox creates the new fieldand places the default value in each record of the table. If you define adefault validity check on an existing field that contains data, Paradox doesnot overwrite the existing data with the new default value. Paradox does not automatically add those fields to any forms, reports, orqueries associated with the table you must explicitly add them. Packing a table Packing a Paradox table reclaims disk space used by deleted records. Packinga d BASE table removes records that are marked for deletion from the table. Paradox lets you permanently remove these records when you restructurethe table. To pack a table 1Open a table. 2Click Format, Restructure Table. 3Enable the Pack Table check box. Restructuring and referential integrity When restructuring the parent table in a referential integrity relationship,you might be prohibited from performing certain restructure operations. Thebasic rule to remember when restructuring a parent table is that you cannotperform any operation that causes records to be removed from the table. Ifyou remove records from the parent table, you risk orphaning records in thechild table. This is in violation of the rules of referential integrity. Eachrecord in the child table must have a valid parent record. You can also use the Visual Database Designer to restructure tables and set referential integrity. For more information, see Visual Database Designeron page 81. Guidelines for restructuring tables that are linked by referentialintegrity: If you resize any field in the parent table, you must choose to trim datathat does not fit in the new field size rather than save such data in the Problems table. You can change field names, but not types or sizes, of fields that are part ofthe referential integrity definition. Tables 107 | 292806769-Paradox-9-Eng.pdf |
You can add a validity check to either table, but you must choose not to enforce it on existing data. (Use the Restructure Warning dialog box tomake this choice. ) The exception to this rule is the creation of a defaultvalidity check on a new field in the table. T o make a parent table the child of another table, that table and all itsexisting child tables must be empty. For example, if ORDERS. DB is theparent table of STOCK. DB, you cannot make ORDERS. DB the child of CUSTOMER. DB unless both ORDERS. DB and STOCK. DB are empty. When working with tables that contain data, if you link more than twotables by referential integrity you must create the first link to the tablethat has no parent. For example, to define referential integrity among the CUSTOMER. DB, ORDERS. DB, LINEITEM. DB, and STOCK. DB tables,you must: create the link from ORDERS. DB to CUSTOMER. DB. create the link from LINEITEM. DB to ORDERS. DB. create the link from STOCK. DB to LINEITEM. DB. T o create a cyclical referential integrity relationship (as in Table A refers to Table B, which refers to Table C, which refers back to Table A ) all thetables must be empty. Viewing Dependent Tables If the table you are restructuring is a parent table, you may be prohibitedfrom manipulating certain data that relates to a child table. You can use the Restructure dialog box to determine what tables depend on the current tablefor referential integrity. To view the dependent tables in a database 1Open a table. 2Click Format, Restructure Table. 3Click the Referential Integrity tab. 4Look in the Dependent Table section to see all dependent tables. 108 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
You can also right-click a link in the Visual Database Designer and choose Link Property. The Link Property dialog box displays the Parents Keyand Child Fields, showing you which table is the parent in a referentialintegrity relationship. Changing field types You can change (convert) a field type at any time. However, if the tablecontains data, you may encounter data format conflicts. See Compatible Paradox field types in the Reference section of the Online Help to determinewhether the existing data will be compatible with the new field type. Alpha field conversions When you convert another field type to an alpha field, the result varies. Allformatting and other definitions associated with the other field type are lost. When you convert a field of another type to an alpha field, you must specify a field size. If some data already in the field contains more characters than thenewly specified length of the alpha field, you can trim the data or moverecords containing such data to the Problems table. If you convert between an alpha field and a date, number, short, or money field, make sure the settings in your Windows Control Panel match thesettings in IDAPI. CFG. Number, money, short, and long integer field conversions In a Paradox table, you can convert a money, long integer, BCD,autoincrement, or short field to a number field. In fact, you can convertamong all of these field types without loss of data, except when a value is toolarge for a short field or includes decimals. In that case, you can either trimthe values or have Paradox write records containing those values to thetemporary Problems table. You can convert an alpha field to a number field if it contains no data inconsistent with a number. If data in the field is inconsistent with a numberfield, you must do one of the following: Have Paradox place the records in a Problems table. Delete the inconsistent data and then make the conversion. Insert a new field and delete the original field (losing all data). Tables 109 | 292806769-Paradox-9-Eng.pdf |
Auto-increment field conversions You can convert existing number, short, and long integer fields to autoincrement fields without losing data only if the number, short, or longinteger field is the tables single-field primary index (key). This ensures thatthe data to be converted to an autoincrement field meets the requirements ofbeing unique and sorted in ascending order. Date field conversions You can convert alpha and timestamp fields to date fields. Paradox saves anyinvalid data in a Problems table. If any record contains data in that field thatcannot be interpreted as a date, Paradox removes the record and writes it tothe temporary Problems table. Here are examples of what kinds of alpha strings can and cannot be converted to dates: Can be converted Cannot be converted 11-Nov-18 Armistice Day 1. 01. 2000 New Years Day, the year 2000 13. 06. 80 Herbs 29th birthday 7/04/1776 July 4, 1776 25-Dec-1066 Christmas Day, 1066 3/30/91 The 30th of March, 1991 If you customize the date format using the BDE Administrator, date values are converted according to your customized settings. Changing a field type You may decide that data in the table is better stored in a different field type. Be sure to check that the field type you are switching to is compatible withthe current field type. To change field types 1Open a table. 2Click Format, Restructure Table. 3In the Field Roster, click the T ype column of the field you want to changeand select a new field type from the drop-down list. 110 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
If the change causes data loss, Paradox prompts you to confirm it. If you confirm the change, Paradox writes the records containing data that couldnot be converted to a temporary table called Problems. You can change the records in the Problems table so they comply with thenew structure, then add them back into the table using T ools, Utilities,Add. For more information, see Adding records on page 131. For more information, see Compatible Paradox field types in the Reference section of the Paradox online Help. Repairing tables Despite your best efforts to create a sound table, there is always the risk thatthe table may become damaged. For example, a power failure may cause dataloss. Although Paradox offers you the option of table repair, some damagemay be beyond this operations mandate. You should always make backupcopies of your important data. Violations When trying to rebuild tables, you may run into problems trying to save therepaired table. This could be because the data now violates certain validitychecks or because duplicate values violate the rebuilt tables key. If problems occur, Paradox responds as follows:If Paradox cannot save certain records because of data violations, it stores them in one of the Auxiliary Tables indicated on the Repair Settings page. The key violation table contains records that Paradox cannot save in therepaired table due to duplicate values in the tables key. When this occurs,the first occurrence is stored in the repaired table and all duplicates arestored in the key violation table. Records that violate validity checks and other data-type violations arestored in the Problems table. You can view both tables by choosing Display Error Tables from the Repair Settings page. The Table Repair operation is used for tables only. It cannot repair otherobjects such as forms and reports. Tables111 | 292806769-Paradox-9-Eng.pdf |
Repairing a table If your table becomes damaged (by a power or system failure, for example), Paradox lets you repair it. Make sure all windows are closed on the Paradox Desktop before you attempt table repair. Rebuilt tables are always converted to the versions specified in the File Format field of the Table Information page. To verify a tables integrity 1Click T ools, Table Repair to open the Table Repair Utility dialog. 2In the Select Table Name box, enter the table that needs to be repaired orbrowse and select it. If the tables header is not damaged, the tables header information appears. 3Choose Verify. If errors are detected, the Table Repair utility promptswhether to display them or not. If specified, it displays the table repairerrors. If errors are encountered, you can choose Rebuild to rebuild the table. To rebuild a table 1Follow steps 1 and 2 in the above procedure. If the tables header is damaged, click Edit and enter the tables structure (or choose Borrow to copy the structure from an undamaged table). 2Enter File Format and Block Size information ( if not automaticallydisplayed). You can change the values that are displayed here. 3Click the Repair Settings tab and change the backup table name if you want. By default, the Table Repair utility supplies a backup table name of Copy of plus the original table name appended to it. If the table ispassword-protected, specify the password. 4Click the Rebuild button. If you have problems saving the new table, it could be because of certainvalidity checks or key violations. 112 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
Changing the appearance of tables The default view of a table is the way it initially looks when you open it. The default view depends on a number of things: your Windows screen colors; the Desktop properties you defined with Edit, Preferences; and the structure ofthe table. Paradox, however, gives you the option of changing the way thetable looks, and the way you view data. You can change the following features by direct manipulation:the order of the columns column width heading height spacing between records (row height) placement of a scroll lock on a column You can change the following features through property inspection:alignment of text and data color of the data or the background typeface of the data and headings color and style of the table gridlines and record marker color and other properties for specified data ranges A fields properties vary depending on the type of data in the field. For example, alpha field properties are different from number field properties,which are different from date properties. Changing a fields properties doesnot change the data or how it is stored. Rearranging fields, columns, and rows You can resize and rearrange the fields, columns, and rows of tables byclicking and dragging with the mouse. The mouse pointer changes shape as it passes over parts of the table that can be moved or resized. Pointer & Property To manipulate Heading height Drag the line above the first record number up or down. Row height Drag the line under the first record number in the window up or down. Tables 113 | 292806769-Paradox-9-Eng.pdf |
Horizontal scroll lock Drag the double triangle icon at the lower left edge of the Table Window to the right. Column width Drag the top of the columns right grid line to the left or right. Order of columns Drag the column heading to the new location. Rearranging fields You can rearrange field order in the Restructure Table dialog box. You can place a field in the following locations: between the rows of existing fields in the row above the first field in the row below the last field To rearrange fields 1Open a table. 2Click Format, Restructure. 3In the Field Roster, click the number of the field you want to move. 4Drag the field to the position you want it to occupy and release the mouse. When you view table data in an alternate format (like a form or report) the property settings you chose in the Table window do not appear. You cancustomize the form or report individually to get the look you want. You cannot move fields in a way that violates the rules for key fields. Forexample, a field defined as the key field must be the first field in the table. Moving, resizing, or rotating columns You can move, resize, or rotate the columns of any open table. To move a column Click and drag the column heading to its new position. 114 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
To resize a column Click and drag the right grid line to the right or left to increase or decrease the width of the column. To rotate columns Click a record in the column you want to move and press CTRL + R. Paradox moves the column to the last position on the right of the table and shifts all other columns one position to the left. Resizing rows You can resize a tables rows to conform to the amount of information youwant to include in the fields. This feature is useful if you want to view moreof a memo or graphic field in table view. To change the height of the rows in a table Click and drag the grid line under a record up or down. Paradox resizes all rows to match the row height you specify. Changing table properties Paradox offers you the ability to change the appearance of tables by changing general attributes to specifying particular properties of individual fields. Paradox lets you change the following properties: colorof table background, individual cells, grid lines, and text alignmentof data within a column or within the column header textof the screen font for the header or data area gridchange the grid from the default settings of background, grid lines,and current records marker. The grid is the pattern of lines that appearsbetween the columns (and, optionally, the rows) of the table. The recordmarker is the horizontal line that appears beneath the current record. You can also change the properties of all data in a field that meets a certainrequirement. For example, in the Qty field of the sample LINEITEM. DBtable, suppose you want to display all quantities less than five on a whitebackground. You can do this using the Data Dependent property. You canspecify ranges that are greater than, equal to, or less than a given value. Youcan also combine ranges, and set separate properties for different ranges ofvalues. Tables 115 | 292806769-Paradox-9-Eng.pdf |
Alpha, number, short, long integer, date, time, timestamp, logical, autoincrement, and money field types (as well as d BASE character, number,float number, date, and logical field types) all have the Data Dependentproperty which you can use to establish a range of values for which the fieldsdisplay is visually different. T o access the Properties dialog box, you right-click the object you want tochange. If you want to change the properties for all fields, press SHIFT,right-click a field, and choose Properties. T o change the properties for allcolumn headings, press SHIFT, right-click the heading, and choose Properties. You can change many table properties in the Table window; however,some table properties can only be changed in a data model. For moreinformation, see Viewing table properties in the Data Model dialog boxon page 180. Creating new default table properties Suppose you know that you will most often want number fields displayed inthe General format, or date fields aligned left, or text displayed in blue. Paradox gives you the ability to establish default properties for each fieldtype and store them in a default file, DEFAULT. TV (Paradox) or DEFAULT. TVF (d BASE). You can create a default property file by creating a new table or copying an existing table that is customized with the settings you want to use asdefaults. To create default properties in a new table 1Create a table in your private directory that includes one of each availablefield type and save this table as DEFAULT. DB. 2Click File, Open, Table. 3Double-click DEFAULT. DB from the file list. 4Press F9 to enter Edit Mode. 5Right-click each field to set the properties for that field type. 6Click Format, Properties, Save to save the property settings in the DEFAULT. TV file. Whenever you work with a table that does not have its own. TV file, Paradox applies the settings from DEFAULT. TV to it. Table-specific. TVfiles override the settings in DEFAULT. TV. 116 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
To create default properties by copying 1Customize a table with the desired default property settings. 2Click Format, Properties, Save to save the default settings. 3Copy the table to DEFAULT. DB in your private directory. Paradox copies the tables. TV file as well as the. DB file, and uses its. TV file for default property settings. For more information, see Creating tables on page 52. Remember to use the Paradox Copy utility when copying tables. For moreinformation, see Copying tables on page 136. If you are short on disk space, you can use Windows Explorer to delete DEFAULT. DB, and any other DEFAULT files (like. PX or. VAL files) thatwere copied along with the table. All you really need is DEFAULT. TV. Saving, restoring, and deleting table properties Saving table properties saves the appearance of the table as you havechanged it. Paradox saves the properties you define in a file with a. TVextension. (Properties for d BASE tables are saved in the. TVF file. ) Forexample, the properties you define for the CUSTOMER. DB table are savedin CUSTOMER. TV. If you try to close a Table window without savingproperty changes, Paradox asks if you want to save your changes. If you change table properties but are unhappy with the changes, you can restore previous settings. When you delete a tables unique property file (. TV or. TVF), Paradox uses default property settings. To save table properties Click Format, Properties, Save to save all the property changes you makein a Table window including property changes to individual fields. To restore table properties Click Format, Properties, Restore. Paradox restores all properties to the settings that existed when you opened (or previously saved) the table properties. Tables 117 | 292806769-Paradox-9-Eng.pdf |
To delete table properties Click Format, Properties, Delete. Changing grid and record marker properties Using the Grid Properties dialog box, you can change the color, line style, and spacing between a tables grid lines. You can also choose to hide ordisplay the grid lines for the heading, column, and row lines. By default,Paradox does not display heading, column, and row lines. The current record marker is a horizontal line that appears beneath the current record in a table. By default, Paradox does not display the recordmarker. To format the grid lines 1Click Format, Properties, Grid. 2Click the Grid Lines tab. 3Enable or disable any of the following check boxes: Heading Linesto display or hide the grid line below the table heading. Column Linesto display or hide the grid lines between the columnsof the table. Row Linesto display or hide the grid lines between the columns ofthe table. 4T o change the color of the grid lines, click a color from the Palette. 5T o change the line style, click a line style in the Line Style box. 6T o change the spacing of the grid lines, click a spacing option from the Spacing box. 7Enable the Query Look check box to move the heading line from belowheading text to behind heading text. 8Click Apply. To format the current record marker 1Click Format, Properties, Grid. 2Click the Record Marker tab. 3Enable or disable the Show Record Marker check box to display or hidethe current record marker. 4T o change the line color, click a color from the Line Color Palette. 118 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
5T o change the line style, choose a style from the Line Style box. 6Click Apply. To change the grids background color 1Click Format, Properties, Grid. 2On the General page of the Properties dialog box, click a color. 3Click the Apply button. If you want to create your own color, see Changing background colors on page 119. You cannot set separate properties for the heading, column, and row lines. Settings apply to all of the grid lines. T o vary the look of your table,experiment by displaying or hiding different grid lines once you set gridproperties. If you set the grid spacing as None, you wont be able to see any gridlines. Changing background colors You can change the color of the background of any field in a table. You canalso create custom colors. For example, you could specify a blue background for a field whenever the value of the field is greater than 50 but less than or equal to 100. You couldspecify a red background whenever the value of the field is greater than 100. To change a fields background color 1Right-click the field you want to change and click Properties. 2In the color section of the General page, click the color to which you wantto change the background. 3Click the Apply button. To create a custom color 1In the color section of the General page, click any of the cells in the rightcolumn of the Color box. 2Click the Add Custom Color button. 3In the Custom Color dialog box, enable the desired color scheme button. Tables119 | 292806769-Paradox-9-Eng.pdf |
4Move the appropriate slider or type in values beside the color boxes to create the color mix you want. 5Click OK to return to the Properties dialog box. 6Click the Apply button. You can change the background color of all the columns at the same timeby pressing Shift + F6. Click the desired color and click Apply. Paradoxapplies the color to all columns. Defining and customizing specific field ranges Suppose youre creating a table of donors for a certain charity. Youd like tosee at a glance those who have given under $100, those who have givenbetween $100 and 500, and those who have given more than $500. Paradoxlets you specify field ranges and then apply custom colors to them. To specify a data-dependent range for a field 1Right-click a field and click Data Dependent. 2In the Data Dependent dialog box, click New Range. 3In the Range Include Values list box, do the following: type in the lower value in the range and select a comparison operator. type in the higher value in the range and select a comparison operator. You can also set properties for that range of values. 4Click Properties in the Data Dependent dialog box. 5In the Properties dialog box, set the background color and font, style, size, and color of the text for that range of values. 6Click OK to return to the Data Dependent Properties dialog box. The Sample box displays a sample of the background color and font you have chosen for that range of values. 7Click Apply Changes. 8Repeat steps 2 to 4 to specify properties for other ranges of values. Paradox changes the appearance of any cells that fall within the range of values specified. 120 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
To remove a data dependent range 1Right-click a field and click Data Dependent. 2In the Data Dependent dialog box, select the range you wish to remove. 3Click Remove. The properties of a data-dependent range override those you may specify for a column. If, for example, you choose a blue background color for acolumn, any records that fall within a data-dependent range specificationare not affected. These records continue to use the background color forthe range, rather than for the column as a whole. Changing the default system font Paradox always uses the default system font for text in new tables and designdocuments. You can change the default system font at any time. When youchange the default system font, the text for all tables changes to the new fontexcept in existing formatted memo fields and in tables where you previouslycustomized the font. How the default system font works in forms and reports The settings of a form or report style sheet always override the defaultsystem font. However, if the style sheet does not specify a font for a givendesign object, Paradox uses the default system font for new ones you create. For example, if you create a new field object, and the style sheet has no fontspecified for the edit region, Paradox uses the default system font for text inthe edit region when you run the form or report. To change the default system font 1Click T ools, Settings, Preferences. 2On the General page of the Preferences dialog box, click the Changebutton. 3Select a font from the Change Font dialog box, and click OK. 4Exit and restart Paradox. If you want Paradox to use the default system font for all text in anexisting table, select Format, Properties, Delete. Paradox also removesany customized viewing properties you have set. Tables 121 | 292806769-Paradox-9-Eng.pdf |
Formatting text You can format the font, style, size, and color of the text of any heading or field in a table. You can also create and use custom colors. To format the text in a table 1Open a table. 2Right-click the heading or field you want to format and select Properties. 3In the Properties dialog box, click the Font tab. 4Select the desired font, style, size, script, effects, and color. 5Click the Apply button. To create a custom color 1Follow steps 1-2 of the above procedure. 2In the Properties dialog box, click the General tab. 3Click any of the cells in the right column of the Color box. 4Click the Add Custom Color button. 5Enable one of the following check boxes: RGBspecifies that you want to change the amount of red, green, and blue in your custom color. HSVallows you to change the hue, saturation, and value of your newcolor. CMYspecifies you want to change the amount of cyan, magenta, andyellow in your custom color. 6Create the color mix using the scroll bars and value boxes. 7Repeat steps 5-6 until you have your desired color. 8Click OK. Changing a formatted memo field Once you have typed text in a formatted memo field, you may decide tochange some properties of the formatting. To format text in a formatted memo field 1Right-click any record in the field and click Properties. 2Click the Font tab. 122 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
3Change the font, style, size, and color of the text as appropriate. 4Click the Apply button to view the changes without closing the Properties dialog box. Aligning text in a formatted memo field To align text in a formatted memo field 1Open a table. 2Double-click the formatted memo field to display the memo text. 3Press F9 to enter Edit Mode. 4Select the text or paragraphs you want to align and right-click and click Properties. 5Click the T ext tab. 6Enable one of the following buttons: Leftto align the text with the left side of the window. Centerto center the text. Rightto align the text with the right side of the window. Justifyto align the text with both sides of the window. 7Enable the desired line spacing button. 8Click the Apply button. Alignment changes in formatted memo fields are applied only to individual memos. Also, any paragraph you select can have its own alignmentsetting. Tables123 | 292806769-Paradox-9-Eng.pdf |
Changing the alignment of heading text and data Alignment refers to the placement of the data in the field or the text in the heading. T ext and data can be aligned horizontally at the left, center, or rightof the column (as illustrated) or vertically at the top, center, or bottom of therow. You can also align text and data vertically with the top, middle, or bottomof the row. To change the alignment of text or data in a heading or column 1Right-click the field you want to align and click Properties. 2Click the Alignment tab. 3Enable one of the following buttons: Leftto align the data with the left side of the column. Centerto center the data horizontally within the column. Rightto align the data with the right side of the column. 4Enable one of the following buttons:T opto align the data with the top of the row. Middleto center the data vertically within the row. Bottomto align the data with the bottom of the row. To align text in a formatted memo field 1Open a table. 2Click the field of the formatted memo you want to align. 3Double-click the formatted memo field to display the memo text. 4Press F9 to enter Edit Mode. 5Select the text or paragraphs you want to align, right-click, and click Properties. 6Click the T ext tab. 124 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
7Enable one of the following buttons: Leftto align the text with the left side of the window. Centerto center the text. Right to align the text with the right side of the window. Justify to align the text with both sides of the window. 8Enable the desired line spacing button. 9Click the Apply button. Alignment changes in formatted memo fields are applied only to individual memos. Also, any paragraph you select can have its own alignmentsetting. Data formats In the Windows Control Panel, Regional Settings, you can declare whichlanguage youre working in and how you want your numbers, currency, timesand dates to appear in Windows applications. What you specify here will beadopted by Paradox and becomes the predefined data format for yourdatabase, controlling how data is displayed in your tables, forms, and reports. Although Paradox provides some standard data formats, you can define custom formats for number, money, date, time, timestamp, and logical fields. Specifying a data format does not change the data or how Paradox stores it,only how Paradox displays the data type. You may decide that you want to have a certain number of decimal places, or have a negative number display with a minus sign in front. You may bedealing with a company in England and want to change your currencysymbol. Perhaps you dont want the date to be displayed as month/day/yearand prefer year/month/day. You may even prefer to have the date written outin full rather than annotated. Paradox offers predefined formats for the following fields:money number date time timestamp logical Tables 125 | 292806769-Paradox-9-Eng.pdf |
You can also specify data formats in the BDE Administrator. Predefined money and number formats The format list for a number or money field shows the following predefined formats: Format Description Windows $ Uses the currency symbol and format that you defined in the Windows Control Panel. Windows # The default format for Paradox number fields. Paradox uses the formatyou specify in the Windows Control Panel. Fixed Displays number values with two decimal places. Trailing zeros aredisplayed. Thousand separators are not used. Negative numbers arepreceded by a minus sign (-). Scientific Displays number values in exponential notation (with four decimalplaces), as a decimal number from 1 to 10 multiplied by a power of 10. Negative numbers are preceded by a minus sign (-). All number formats use scientific notation to display numbers that aretoo big to fit. The Scientific format always uses scientific notation. General Displays number values with up to two decimal places if the numberincludes a decimal value. Trailing zeros and thousand separators are notdisplayed. Negative numbers are preceded by a minus sign (-). Comma Displays number values with two decimal places. Trailing zeros aredisplayed. Thousand separators are used and displayed as a comma. Negative numbers are displayed in parentheses. Percent Displays numbers followed by the percent sign (%). For example, thevalue. 5 is displayed as 50. 0%. Thousand separators are not used. Negative numbers are preceded by a minus sign (-). Integer Displays whole numbers only. Decimal values are rounded when youconvert to the Integer format. If you convert to a format that displaysdecimals, they are returned. Thousand separators are not used. Negativenumbers are preceded by a minus sign (-). DBNumeric Uses the number format settings from your BDE configuration settings. If you want to define your own number and money formats, see Creatinga custom data format on page 129. 126 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
Predefined date, time, timestamp and logical formats This overview provides a list of predefined formats and how they are displayed. You can also define custom date formats. For more information,see Creating a custom data format on page 129. Predefined date formats The format list for a date field shows the following predefined formats: Format Description DB Date Uses the date format settings from your BDE configuration settings. Onedigit is used for months and days 1 through 9 and two digits for the yearin the format month/day/year (for example, 1/5/58). ISO Date (International Organization for Standardization. ) Displays dates usingfour-digit numbers for the year, followed by two-digit numbers for themonth and day, each separated by a period (for example, 1958. 01. 05). mm/dd/yy Displays dates using two-digit numbers for the month, followed by theday, followed by the year, each separated by a slash mark (for example,01/05/58). Windows Long Uses the long date format you define in the Windows Control Panel Regional Settings Properties dialog box (for example, Sunday, January 5,1958). Windows Short Uses the short date format you define in the Windows Control Panel Regional Settings Properties dialog box (for example, 5/1/58). For each format, a two-digit yy value from 00-50 (2000-2050) is assumed tobe in the twenty-first century. Dates entered from 51-99 (1951-1999) areassumed to be in the twentieth century. T o override the default dateassumption, use a four-digit display and specify all digits of the year. For allother centuries, you must specify all four digits. Predefined time formats The format list for a time field shows the following predefined formats: Format Description Windows Time Uses the time format you define from the Windows Control Panel Regional Settings Properties dialog box. hh:mm:ss am Displays two digits of hours, minutes, and seconds, separated by colonsand followed by AM or PM. DBTime Uses the time format settings from your BDE configuration settings. Tables127 | 292806769-Paradox-9-Eng.pdf |
Predefined timestamp formats The format list for a timestamp field shows the following predefined formats: Format Description Win. Date Stamp Uses the date and time formats you define in the Windows Control Panel Regional Settings Properties dialog box. hh:mm:ss am mm/dd/yy Displays hours, minutes, and seconds (2 digits each), separated by colons and followed by am or pm and the month, day, and year. DBTimestamp Uses the timestamp format settings from your BDE configuration settings. Predefined logical formats The format list for a logical field shows the following predefined formats. These formats let you choose what values to accept as true and false in thelogical field. Male/Female True/False Y es/No Specifying the format for numeric data Paradox offers the user the ability to define the way in which numeric data will be displayed. To specify the format in which a number, money, date, time, timestamp, or logical field is displayed 1Right-click a numeric field and select Properties. 2Click the Format tab. 3Select one of the formats from the Format list box. To create a new format 1Follow steps 1-2 from the above procedure. 2Click the Create New Format button. 3Click the Create button. 4T ype a new name in the Name box. 5In the Number format Section, define the new Name format. 6Click OK. 128 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
For more information, see Creating a custom data format on page 129. Creating a custom data format You can define custom formats for number, money, date, time, timestamp, and logical fields. Specifying a data format does not change the data or how Paradox stores it, only how Paradox displays the data type. The procedure for all data types is similar to the following procedure. To create a custom data format 1Right-click a field (one of the types listed above) in an open table and click Properties. 2In the Properties dialog box for the specific field, click the Format tab. 3Click the Create New Format button. 4In the Existing Formats panel, click an existing format as the base for thenew format. 5In the Select Number Format dialog box, click the Create button. 6In the Name text box, type a name for the format. You must give each format a unique name, regardless of the data type it applies to. For example, you cannot give a number format and a dateformat the same name. 7In the Format panel, choose properties for the format. For details abouteach setting, click Help in the dialog box. If you want to use a Windows Control Panel default format for a particular option, right-click that format options text box. Youll see a menu ofdefaults you can use. 8Click the Add Format button to add the new format to the Existing Formats list. Set the Windows number and money formats from Regional Settings inthe Windows Control Panel. Tables129 | 292806769-Paradox-9-Eng.pdf |
Changing or deleting a custom data format You can change only custom formats, not Paradox-provided formats. The procedure for changing or deleting custom number, money, date, time, timestamp, and logical field formats is similar for all. To change a custom format 1Right-click a field (one of the types listed above) in an open table and click Properties. 2Click the Format tab. 3Click the Create New Format button. 4In the Existing Formats panel, click the format you want to change. 5Click the Change button. 6If you want to change the name of the format, type a name for the formatin the Name box. 7In the Format panel, choose properties for the format. For details abouteach setting, click Help in the dialog box. If you want to use a Windows Control Panel default format for a particular option, right-click that format options text box. Youll see a menu ofdefaults you can use. 8Click the Accept button to verify the changes to the format. To delete a custom format 1Right-click a field (one of the types listed above) in an open table and click Properties. 2Click the Format tab. 3Click the Create New Format button. 4In the Existing Formats panel, click the format you want to delete. 5Click the Delete button. Adding, moving, and subtracting table records Paradox has several utilities available to help manipulate records. Forexample, you can add (copy) all the records from one table to another tablewith the same structure. You can move or reassign dependent records to anew parent or master table. You can delete records without searching forthem by creating a subtraction table that exactly matches the tables fromwhich you want to cull records. (When you enter a record in the subtraction 130 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
table, that record is automatically deleted from the table. ) Finally, you can empty tables of all records while retaining the tables structure and validitychecks. Adding records You can use the Add command to add a copy of the records in one table toanother, provided the tables have the same structure. The Add commandallows you to add new records, update existing records, or both. Windows lets you open several instances of the same table at the same time, so you could be considered another user of the table, preventing the recordsfrom being added. You can add records to an open table only if you areviewing the table; you cannot add records to a table that is open in Edit Mode. Some field type conversions can result in invalid records being written to the temporary Problems table. If this happens, edit the records in the Problemstable and then add them again. The Problems table is not generated for SQLtables; the invalid records are dropped. When you add records to tables using the Add command, Paradox acquires a read lock on the source table and a write lock on the table you add records to. Until the records are added, other users cannot change the contents orstructure of either table, and cannot perform any operation that requires awrite or exclusive lock on the target table. If another user has already placeda write or exclusive lock on either table, you must wait until the lock isremoved before using Add. Rules for Adding records from another table The table you add records to can have more fields than the source table,as long as the first fields of the table you add the records to are compatiblewith all fields of the source (compatible fields types in the same order). Paradox places null values in the extra fields. The source table can have more fields than the table you add the recordsto, as long as the fields of the table you add the records to are compatiblewith the first fields of the source (compatible field types in the sameorder). Paradox ignores the extra fields. If the table you add the records to is keyed, the added records mustconform to the rules of the key. Paradox places records that do notconform in the temporary KEYVIOL. DB table in your private directory. The source table is never changed during an Add operation; it does notmatter if it is keyed or not. Tables 131 | 292806769-Paradox-9-Eng.pdf |
Adding records to a different table type The two tables you use in the Add operation must have compatible (though not necessarily identical) field types in the same order. For fields to becompatible, Paradox must be able to change from the existing field type tothe new field type in a Restructure operation. For example, Paradox number(N) and money ($) fields are compatible, but Paradox number (N) and graphicfields (G) are not. For more information, see Compatible Paradox field types in the Reference section of the Paradox online Help. For information about compatible field types for SQL tables, see your SQLLinks documentation. Adding records from another table T o quickly add many records to a table, you can merge the records fromanother table that has the same structure. The two tables can be of differenttypes, as long as their fields are compatible. You can perform an Addoperation across directories. To add records from another table 1Click T ools, Utilities, Add. 2In the Add Records In dialog box, select the table from which you want toadd records. 3Click OK. 4In the Add Records T o dialog box, select the table to which you want toadd records. 5Enable one of the following buttons: Appendto add records to the target table without affecting existing records. Updateto update records that already exist in the target table. Anyrecords in the source that dont match the target table are not added. Append And Updateto overwrite matching records and add newrecords to the target table. 132 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
T o verify that the source and destination tables are suitable for this procedure, see Adding records on page 131. Moving records In certain situations, you may have a record in one table that corresponds toa record in another table. This can happen in a referential integrityrelationship where one record in a parent table is related to one or morerecords in a child table. It can also occur in a multi-table form where onerecord of the master table is related to one or more records in the detailtable. For example, suppose you have a table with a list of salespersons. This table, the parent table, has a child table called Customers. (Referential integrity willbe established on a common Salesperson ID field). Each salesperson canhave many customers assigned to them, but only one salesperson can beassigned to a customer. This is called a one-to-many relationship. Supposethat a salesperson named Jones has fifty customers assigned to him. In the CUSTOMER. DB table, fifty customers have Jones listed as theirsalesperson. If Jones decides to leave the company, those fifty customers willhave to be reassigned to another salesperson. This is called movingdependent records. You can use the Move Help command to move or reassign a dependent record from one master record to a different master record. Moving dependent records Paradox lets you move or reassign dependent records. To move dependent records 1Open the dependent (child) table. 2Press F9 to enter Edit Mode. 3Select the record that you want to move or reassign by clicking the field ofthe record that corresponds to the first field of the master table in areferential integrity relationship. You can click any field of a detail table. 4Click Record, Reference, Move Help. 5In the Move Help dialog box, click the new master record. Subtracting records Using the Subtract command, you can remove the records from one tablethat match the records in another table (called the subtraction table). You can Tables133 | 292806769-Paradox-9-Eng.pdf |
subtract records only from a keyed table. During a subtract operation, Paradox removes any record that contains a value in its key that exactlymatches the corresponding field(s) of a record in the subtraction table. Suppose you wanted to pare down your customer records to include only those customers who answered your last mass mailing. You could use the Subtract command to remove from the customer information table all of therecords that matched records in another (called the subtraction table). First, you would create a table containing the names of all of the customers who didnt answer your mailing list. When you used the Subtract command,Paradox would match the list of names of users who didnt answer themailing list to the names in the customer information table, and would thenremove records that match. The result is a smaller customer table containingonly the names of those customers who responded to the last mailing. Paradox deletes the rest of the records. Rules for subtracting records The table from which you want to subtract records must be keyed. The two tables you use in the Subtract operation must have compatiblestructures. This means compatible fields in the same field order. This canbe easily achieved by borrowing the original tables structure. If the table you subtract from is the parent table in a referential integrityrelationship, the Subtract operation will only subtract records that do notexist in the child table. You must first either delete the referentialintegrity (by restructuring the child table) or delete the related record inthe child table. Windows lets you open several instances of the same table at the sametime, so you could be considered another user of the table, preventing therecords from being subtracted. You can subtract records from an opentable only if you are viewing the table. You cannot subtract records from atable that is open in Edit Mode. Subtracting records on a network When you use the Subtract command to subtract records, Paradox needs toacquire a read lock on the table that contains the records you are subtractingand a write lock on the table you are subtracting records from. This meansthat until the records are subtracted, other users cannot change the contentsor structure of either table or perform any operation that requires a write orexclusive lock on either table. If another user has already placed a write or exclusive lock on either table, you must wait until the lock is removed before using Subtract. 134 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
The Subtract command is not like a query. When you subtract records from a table, you are deleting matching records. Because d BASE and SQL tables do not support Paradox keys, you cannotsubtract records from d BASE or SQL tables. Instead, use a DELETEquery. You cannot use an SQL table as the source of a subtract operation. Subtracting a record Once you have created a subtraction table that contains the records you wantto eliminate, the Subtract command lets you subtract records from one tablethat match records in the subtraction table. T o verify that the tables meet Subtract command requirements, check the rules listed in Subtracting Records on page 133. Warning! The Subtract command is not like a query. When you subtract recordsfrom a table, you are deleting matching records from other tables. To subtract records from a table 1Click T ools, Utilities, Subtract. 2In the Subtract dialog box, select the table that contains the records youwant to match. This is your subtraction table. 3Click OK. 4In the Subtract Records From dialog box, select the table from which youwant to subtract records. Copying, renaming, emptying, and deleting tables Once youve created and customized a table, Paradox gives you the options ofcopying, renaming, or even deleting it. Copying tables You can copy tables, forms, reports, queries, scripts, SQL files, libraries, datamodels, style sheets, and text files from within Paradox. For best results, always use the Paradox Copy utility to copy Paradox or d BASE tables and other Paradox objects. Using the DOS COPY command or Windows Explorer may not copy all related files that make up a table (forexample, the files containing a tables primary index, secondary indexes,validity checks, or BLOB data). The Paradox Copy command, however,copies all files correctly. Tables 135 | 292806769-Paradox-9-Eng.pdf |
When you copy a table, Paradox copies both its structure and the data contained in it. Paradox also copies the tables key (primary index) secondary index(es) (except. NDX files on d BASE tables) validity checks referential integrity table properties (as youve set them in the Table Window) Renaming tables If the mandate of your company or project changes, you may want to rename your tables. Paradox makes it easy to rename tables. Deleting tables You can delete tables, forms, reports, queries, scripts, SQL files, libraries,data models, and style sheets from within Paradox. Windows lets you open several instances of the same table at the sametime, so you could be considered another user of the table, preventing therecords from being copied. Be sure to close the Table Window and any ofits associated document windows before using Copy. Copying tables Paradox lets you copy tables while keeping the table structure intact. 1Click T ools, Utilities, Copy from the menu. 2Select the table you want to copy and press OK. 3T ype the name of the new table Copying tables on a network When you copy a table, Paradox must acquire a read lock on the original table and an exclusive lock on the copy. Therefore, no user can change thecontents or the structure of the table youre copying during the Copyoperation. If you copy to an existing table, there can be no locks open on thattable. If there is a record lock, write lock, or exclusive lock on the tableyoure copying, you wont be able to make the copy until the lock is removed. 136 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
These elements are copied only when you copy the table to another table of the same type. That is, they are copied only when you copy a Paradoxtable to another Paradox table or a d BASE table to another d BASE table. Renaming tables When renaming a table, Paradox must acquire an exclusive lock on the table. An exclusive lock means no user can access the table in any way if there is a lock of any type open on the table, you must wait until its released before you can use the Rename utility if you rename an object with an existing objects name, Paradox deletesthe existing object To rename an open table 1Click T ools, Utilities, Rename. 2T ype a new name for the table in the Rename dialog box. Paradox renames the table and any open forms and reports associated with it. Be careful when renaming tables. Once renamed, a table cant be found byassociated documents. Forms, reports, or queries that refer to a tableunder one name wont be bound to the table under its new name. Thenext time you open an unbound object, Paradox asks you to supply thename of the table to which youd like it to be bound. You cannot rename a table to change its type. A Paradox table must berenamed as a Paradox table, and a d BASE table must be renamed as ad BASE table. You cannot rename a table that is identified as the parent table in areferential integrity relationship. You must first either delete thereferential integrity (by restructuring the child table) or delete the childtable. Tables 137 | 292806769-Paradox-9-Eng.pdf |
You can avoid problems with forms and reports by having them open in their Design Windows while you rename the table. Paradox automaticallymodifies them with the new table name. (You must save the forms andreports to make the change permanent. ) When renaming an object, you can type a full path when you type theobjects new name. This both renames the object and moves it to a newlocation. Emptying tables You can use the Empty command to remove all records from a table, leavingthe tables structure (including all keys, indexes, and validity checks) intact. You can use Empty on Paradox, d BASE, and SQL tables. When you empty ad BASE table, all records in the table are marked as deleted. When you use Empty, Paradox must acquire an exclusive lock on the table. This means that no user can access the table in any way. If there is a lock ofany type open on the table, you must wait until it is released before you canuse the Empty utility. To empty a table 1Click T ools, Utilities, Empty. 2In the Empty dialog box, select the table you want to empty. You cannot empty a table that is identified as the parent in a referentialintegrity relationship. You must first either delete the referential integrity(from the child table) or delete the child table. Deleting tables Paradox arranges data in tables. However, one table in Paradox may involvemore than one DOS file. Always use the Paradox Delete command to deletetables from within Paradox. Using the DOS DELETE command or the Windows Explorer may not delete all related files that make up a table (forexample, the files containing a tables primary index, secondary indexes,validity checks, referential integrity, or BLOB data). The Paradox Deletecommand, however, deletes all files correctly. 138 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
Deleting tables on a network When you use Delete to delete a table, Paradox must acquire an exclusive lock on the table. This means no user can access the table in any way. if there is a lock of any type open on the table, you must wait until its released before you can use the Delete utility. This means you cannotdelete a table that is open on your Desktop. Windows lets you open several instances of the same table at the same time,so you could be considered another user of the table, preventing the recordsfrom being deleted. Be sure to close the Table Window and any of itsassociated document windows before using Delete. To delete a table 1Click T ools, Utilities, Delete. 2In the Delete dialog box, select the table you want to delete. Be careful when deleting objects. You cant undo a deletion. Be sure that atable isnt used in any forms, reports, or queries before you delete it. Forms, reports, or queries that depend on the table are not deleted whenthe table is deleted. You cannot delete a table that is identified as the parent in a referentialintegrity relationship. You must first either delete the referential integrity(from the child table), empty the child table, or delete the child table. Locking tables There are several kinds of locks in a multi-user environment. For example,when you edit a value, you see the message Record is now locked in the Status Bar. Locks prevent two users from editing the same record at thesame time. As soon as you move off the field, Paradox automatically unlocksthe record. You can also manually lock and unlock tables, using the Set Locks command. The locks controlled by the Set Locks command lock the entire table provide varying levels of protection must be explicitly placed and removed Tables 139 | 292806769-Paradox-9-Eng.pdf |
This table summarizes users rights under different levels of locks placed from the Desktop using the Set Locks command. The lock levels arearranged in order of increasing strength. Lock level and Your rights Other users rights and Locksother users can place None, None All, All* Open, Read (write if no other user has a read lock) Read/Write, All except exclusive if no record lock in place. Otherwise only Open. Read, Read (write if no other user has a read lock) Read, Open/Read Write, Read/Write Read, Open Exclusive, All None, None Image Other users sharing the table cant modify its properties * No Lock means no Desktop-level locks are placed by you. If another type of lock is in place (a record lock or open lock), you cannot obtain an exclusivelock. Paradox maintains a Desktop-level lock until you exit Paradox or removethe lock (select No Lock). Displaying table locks You can display the type of locks placed on tables as well as who has placedeach lock. To display table locks 1Click T ools, Security, Display Locks. 2In the Select File dialog box, select the table whose locks you want todisplay. 3Click Open. Paradox displays the locks that have been placed on the table and who placed them. This column Shows Type What type of lock is on the table. Username The name of the person who placed the lock. 140 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
Net Session The session number of the person who placed the lock. Our Session 1 means the lock is yours. 0 means another user placed the lock. Record Number Which record is locked (if the lock is a record lock, not a table lock). The Locks table always includes a lock placed by you. Paradox automatically places this lock on the table when it checks its locks. Paradox removes this lock immediately after gathering lock informationabout the table. By the time you see this lock in the Locks table, it hasbeen removed. Locking a table You can lock tables to prevent other users from opening or editing them. To lock a table 1Click T ools, Security, Set Locks. 2In the Table Locks dialog box, select the table you want to lock. Bydefault, the Table Name list displays tables in the working directory. 3Enable any of the following buttons: Read Lockto prevent other users from writing to the table and prevent other users from placing a lock on the table that prevents youfrom reading it. Your right to read is guaranteed. Write Lockto be able to read and write to the table and prevent otherusers from writing to the table. Exclusive Lockto prevent other users from reading or writing to thetable. No Lockto remove a lock from the table. Open Lockto prevent other users from placing an exclusive lock onthe table. Tables 141 | 292806769-Paradox-9-Eng.pdf |
Entering and editing table data 143ENTERING AND EDITING TABLE DATA 4 Once you create a table, you can begin entering data. Paradox provides many different ways to enter and edit data. Depending on the task, different Paradox commands will be the most useful and convenient. For example, ifyou are adding or updating records with records that exist in another table,you can use the Add command to append and update table records. If you areediting specific values within a field, you can use the Locate And Replacecommand. When you are working with a single record or field, Paradoxprovides you with a full set of standard editing commands such as Cut, Copy,Paste, and Undo. T o prevent users from editing the data, Paradoxautomatically locks a record when you begin editing and removes the lockonce you leave the record. Paradox automatically saves the data as soon as you leave a record, so you do not need to use the Save or Save As commands to save table data. You can enter data into tables directly, use Lookup tables, or use design forms to enter data into one or more tables. In order to enter or edit data,Paradox requires you to change to Edit mode. Once youre in Edit mode, youcan move the insertion point to any of the tables (or forms) fields and begintyping. Data entry basics Paradox offers many frameworks for data entry and editing. You can deleteentire fields immediately or go to Field View to modify your edits. Another | 292806769-Paradox-9-Eng.pdf |
option is Using Memo View to edit text in a word processing environment. To facilitate editing, Paradox offers tools and keyboard shortcuts. Forexample, selecting cut and paste to move data or pressing HOME to movethe cursor to the first field in a record. Editing data When you first open a table, you are in View mode. Before you can enter datainto your table, you must be in Edit mode. Since Paradox highlights theentire field, you can eliminate all the data at once; alternatively, you can gointo Field View to edit data selectively. To change to Edit mode Press F9. T o return to View mode, press F9. To edit field content 1In Edit mode, click a field. 2T o delete the entire field content, press DELETE. 3T o delete a word or number from the field, double-click the item to highlight it and press DELETE. 4T ype the new information. To edit part of a field with Field View 1Open a table. 2Press F9 to enter Edit mode. 3Click the field you want to edit. 4Click View, Field View. 5Edit the value in the field. If you dont like the changes youve made to a field, press ESC before leaving it. This will delete the data. When you move to another field, Paradox exits Field View (though you are still in Edit mode). If you want to move from field to field and remain in Field View, click View, Persistent Field View. T o exit Persistent Field View, click View, Persistent Field View. 144 Paradox 9: Chapter 4 | 292806769-Paradox-9-Eng.pdf |
If you enter Field View on a memo, formatted memo, graphic, or OLE field, Paradox places the selected fields value on top of the table. This iscalled Memo View. Memo View provides you with greater use of thekeyboard. Edit commands With a table or form open in Edit mode, you can use the following commands. You can access these commands by clicking Edit on the menu bar. Choose To Undo Undo all changes to the current record. This does not undo any changesyou posted. You must choose Undo before leaving the record. Cut Delete a value from a selected field or fields in a table (or form) andplace it on the Windows Clipboard. Copy Copy a value from a selected field or fields in a table (or form) and placeit on the Windows Clipboard. In a Table window, you can copy more thanone field at a time. When you make your selection, lines appear aroundthe selected data. Paste Paste the contents of the Windows Clipboard into the selected field. Paste Special Establish a link using Dynamic Data Exchange (DDE) from another Windows application to your table. Copy To Copy the current selection to an external file. Paste From Paste a value from an external file into the selected field. Delete Remove the value. Paradox does not place it on the Windows Clipboard. Note: You can remove an entire record with Edit, Delete but not with Edit, Cut. Select All Select all fields in the table (the entire table). Paradox places a box around the table. You can paste only a valid value into a field. For example, you cannot pastea graphic value into an alpha field. Entering and editing table data145 | 292806769-Paradox-9-Eng.pdf |
In addition to the usual Edit menu commands, you can press CTRL+Di n any field to copy a field value from the record above it. T o insert todays date in a date field, press SPACEBAR three times. Paradox adds the three elements of a date separately. Using Memo View to enter and edit memo and formatted memo text Entering data in memo and formatted memo fields is similar to entering datain alphanumeric fields. However, in memo and formatted memo fields,Paradox places no limits on the amount of data you can enter. When youreediting a memo or formatted memo, you can use Memo View. Editing in Memo View gives you some word-processing capabilities and gives yourkeyboard greater functionality than in Field View. You can enter as much data as necessary in a memo or formatted memo field. T ext automatically wraps at the right side of the window. Changing the size ofthe window changes the text wrapping. For more information about wrappingtext, see Using Word Wrap on page 455. To view and enter memo data 1Open a table or form. 2Click a memo field to select it. 3Press F9 to switch to Edit mode. 4Click View, Memo View. 5T ype and edit memo text as desired. For a complete list of keys you can use in Memo View, see Memo View keys in the Reference section of the online Help. 6Once you finish editing the memo, press SHIFT+F2 to close Memo View. Paradox saves the data in the memo field when you exit Memo View. When you return to the table, the amount of memo text visible dependson the column width and the field size of the memo field. For informationon resizing columns and rows, see Moving, resizing, or rotatingcolumns on page 114 and Resizing rows on page 115. To change the properties of formatted memo text 1Click a memo field to select it. 2Click View, Memo View. 3Select the text you want to change. 146 Paradox 9: Chapter 4 | 292806769-Paradox-9-Eng.pdf |
4Right-click and choose Properties. 5Click the Font page. 6Adjust the font, color, and size of the text. 7Click the T ext page. 8Adjust the alignment and spacing of the text. 9Click Apply. When entering data in a memo field using a form, you cant change the field size. T o do that, you must click the Design toolbar button to open the Form Design Window. From the Form Design Window, you can placehorizontal or vertical scroll bars on the field. This way, you can keep thefield small but view all of its contents. When viewing a form, Paradox does not display a special window to showyou the contents of a memo or formatted memo field. These fields alwaysappear in the size and shape you specify from the Form Design Window. Shortcuts for faster data entry Use these keyboard shortcuts for faster data entry. You can also use thenavigation buttons on the toolbar. Press To HOME Move to the first field of the table, remaining on the selected record. CTRL + HOME Move to the first field of the first record of the table. END Move to the last field of the table, remaining on the selected record. CTRL + END Move to the last field of the last record of the table. CTRL + BACKSPACE Delete the word to the left of the insertion point. Note: CTRL + BACKSPACE works only when you are in Field View and do not have text selected. CTRL + D Duplicate the information from the record above the selected field to the selected field. ESC Undo a field edit (you must press ESC before you leave the field). SPACEBAR Enter current date, time, or both in date, time, or timestamp fields. Youmust press SPACEBAR for each part of the fields format. Entering and editing table data147 | 292806769-Paradox-9-Eng.pdf |
Why cant I leave a field? The Status Bar at the bottom of the desktop displays the problem. If you cannot see the Status Bar, maximize the Paradox window. If you cant leave a field, it may be because the value you have or have not entered violates the validity checks, table lookup, referential integrityrelationships or key. Alternatively, you may have tried to enter data that isincompatible with the field type. T o find out what type of values you need toenter, you will want to view the tables structure to see what rules have beendefined for the field. To move off a field in which youve inserted an incorrect value Delete the value in the field by pressing CTRL + BACKSPACE. To view the data entry rules defined for a field 1Click View, Table Structure. 2Click one or more of the following tabs: Field Rosterto view any validity checks. Table Lookupto view any table lookup details. Referential Integrityto view any parent tables (to which you can refer for valid values for that field). 3Once you discover what types of values are acceptable for the field, click Done. Inserting, posting, and deleting records Paradox makes it easy to insert records into existing tables. Once you haveinserted a record and entered data, you can save your record by moving offthat field. Alternatively, you can save your data without moving off therecord. This is called posting a record. If you no longer need the record, youcan delete it. Inserting records You will often find it necessary to insert new records in your tables. Perhapsyou have a new customer, product, or vendor. Paradox lets your insertrecords easily and quickly. 148 Paradox 9: Chapter 4 | 292806769-Paradox-9-Eng.pdf |
To insert a record 1Open a table or form. 2Press F9 to switch to Edit mode. 3Put your insertion point where youd like the record inserted. 4Press INSERT. Paradox opens a new blank record above the insertion point position. You can also insert a new blank record by navigating past the last record in a table. 5Enter your data. Paradox posts the record as soon as you move off the record. If you insert a record into a filtered view of a tables data or a direct query view, and the record does not meet the criteria established by the filter orquery, you wont see the record when it is posted. When working in a single-record form, inserting a record seems likeinserting a blank screen. When you press INSERT or click Record, Insert,the record values appear blank. This is because Paradox has both insertedand moved to the new blank record. T o add records from another table, you can use the Add command. Fordetails, see Adding records from another table on page 132. Posting a record Saving a record is often called posting or committing a record. When workingin a multi-user environment, other users do not see changes youve madeuntil youve posted them. You can save a new record without moving off of it. If the table is keyed, Paradox automatically moves the record to its correctlocation in the table. If the table is not keyed, the new record stays whereyou added it. To save a record without moving off it Click Record, Post/Keep Locked. Entering and editing table data 149 | 292806769-Paradox-9-Eng.pdf |
When you post a record in a keyed table, Paradox automatically moves it to its proper position in the table. If the records proper position is offscreen, the record may seem to disappear as it is posted. However, if youlook at the record count on the Status Bar, youll see that the record hasbeen added. Your view of the table might not change when Paradox poststhe record, but the insertion point remains where it was when youpressed INSERT. Deleting fields and records You will often want to delete data from individual fields if the information isincorrect. You will want to delete records when, for example, you lose acustomer or when a product becomes obsolete. Warning!If you accidentally delete the wrong field, click Edit, Undo immediately. To delete data from a field 1Press F9 to enter Edit mode. 2Click the field you want to delete to select it. 3Click Edit, Delete. If you only want to delete part of a field, press F9 to enter Edit mode, and then click View, Field View. Select the data you want to delete and click Edit, Delete. To delete records 1Open a table or form. 2Press F9 to switch to Edit mode. 3Click any field in the record you want to delete. 4Press CTRL + DELETE to delete the record. You cannot retrieve deleted records from Paradox tables. Deleting arecord in a d BASE table does not permanently remove it. You can viewdeleted d BASE records with the Show Deleted command. 150 Paradox 9: Chapter 4 | 292806769-Paradox-9-Eng.pdf |
You can also use the Cut command to remove data and store it on the Clipboard. Deleting records does not reclaim disk space. T o delete all records andreclaim disk space click T ools, Utilities, and Empty. Cutting, copying, and pasting data In addition to typing values in fields, you can cut or copy data from one fieldand paste it into a different field or a different application. Data you cut orcopy remains on the Windows Clipboard until you change it, clear it, or exit Windows. Things to remember about pasting The latest contents of the Clipboard are not deleted when you paste, soyou can paste as many times as you want. You cannot paste multiple field values back into a table. You can, however,paste them into any other application which accepts them (for example,Quattrofi Pro). You can use Edit, Paste From to paste data from external files. For moreinformation, see Pasting from a file on page 155. You can use Edit, Paste Special to create DDE and OLE links. For moreinformation, see Inserting an OLE object linked to part of a file on page483 and Using Paradox as a DDE server on page 488. Cutting and pasting data If you decide that you want to move the contents of a field, a portion of afield, multiple fields, an entire column or row of data, or even all the fields inyour table, you can cut and paste the data to another location. To cut and paste an entire field 1Press F9 to enter Edit mode. 2Click the field to select it. 3Click Edit, Cut. The field you just cut disappears from the work area but is held by Paradox on the Clipboard. 4Go to the location where the cut data is to be placed. 5Click Edit, Paste. Entering and editing table data 151 | 292806769-Paradox-9-Eng.pdf |
To cut and paste multiple fields 1Press F9 to enter Edit mode. 2Click and drag the mouse diagonally until a box encloses all of the fields you want to cut. 3Follow steps 3 to 5 in the previous procedure. To cut and paste an entire column of data 1Press F9 to enter Edit mode. 2Double-click the column heading to select the column. 3Follow steps 3 to 5 in the T o cut and paste an entire field procedure(above). To cut and paste an entire row (record) 1Press F9 to enter Edit mode. 2Double-click an unselected record number. (If the record number isselected when you double-click, you enter Field View). 3Follow steps 3 to 5 in the T o cut and paste an entire field procedure(above). To cut and paste all fields in a table 1Press F9 to enter Edit mode. 2Click Edit, Select All. 3Follow steps 3 to 5 in the T o cut and paste an entire field (above). To cut and paste a portion of a fields data in Field View 1Press F9 to enter Edit mode and then click View, Field View. 2Select the part of the field you want to cut. 3Click Edit, Cut to cut the portion youve selected. 4Go to the location where the cut data is to be placed. 5Click Edit, Paste. You can cut, copy, and paste data to and from files. 152 Paradox 9: Chapter 4 | 292806769-Paradox-9-Eng.pdf |
Copying and pasting data If you decide that you want to copy the contents of a field, a portion of a field, multiple fields, an entire column or row of data, or even all the fields in yourtable (while leaving the original data intact), you can copy and paste the datato another location. To copy and paste an entire field 1Press F9 to enter Edit mode. 2Click the field to select it. 3Click Edit, Copy. The field you just copied remains unchanged. 4Go to the location where the copied data is to be placed 5Click Edit, Paste. To copy and paste multiple fields 1Press F9 to enter Edit mode. 2Click and drag the mouse diagonally until a box encloses all of the fields you want to copy. 3Follow steps 3 to 5 in the T o copy and paste an entire field procedure (above). To copy and paste an entire column of data 1Press F9 to enter Edit mode. 2Double-click the column heading to select the column. 3Follow steps 3 to 5 in the T o copy and paste an entire field procedure (above). To copy and paste an entire row (record) 1Press F9 to enter Edit mode 2Double-click an unselected record number. (if the record number isselected when you double-click, you enter Field View). 3Follow steps 3 to 5 in the T o copy and paste an entire field procedure(above). Entering and editing table data 153 | 292806769-Paradox-9-Eng.pdf |
To copy and paste all fields in a table 1Press F9 to enter Edit mode 2Click Edit, Select All. 3Follow steps 3 to 5 in the T o copy and paste an entire field procedure (above). To copy and paste a portion of a fields data in Field View 1Press F9 to enter Edit mode and then click View, Field View. 2Select the part of the field you want to copy. 3Click Edit, Copy. 4Go to the location where the copied data is to be placed. 5Click Edit, Paste. You can cut, copy and paste data to and from one file to another. Copying to a file You can use the Edit, Copy T o command to copy field values to external files. You can copy values in graphic, binary, memo, and formatted memo fields tonon-Paradox file formats without using the Export command. You must be in Field View or Memo View to copy selected text. When using a form, you can copy values from any field type to a non-Paradox file format without using the Export command. In Field View or Memo View,you can copy selected text inside the field. Paradox can copy graphic files only to the. BMP file format. When you work with a binary field in a table, you can use Copy T o to copy binary field values to a non-Paradox file format. The file extension you use isunrestricted. To copy a fields value to an external file 1Click a field to select it 2Click Edit, Copy T o. 154 Paradox 9: Chapter 4 | 292806769-Paradox-9-Eng.pdf |
3T ype the filename (including full path if necessary) and extension in the File Name box. Paradox creates a new file with the name you have specified and places the contents of the selected field in it. Pasting from a file You can use the Edit, Paste From command to paste values from non-Paradoxfiles into Paradox fields and objects. You can paste text from. PXT,. TXT, and. RTF files into memo or formatted memo fields. If youre using a form, youcan paste text into all field types except graphic and OLE. To paste a value from an external file to a Paradox field 1Click the field into which you want to paste the data. 2Press F9 to enter Edit mode. 3Click View, Memo View if you selected a memo or formatted memo field. Otherwise, go to step 4. 4Click Edit, Paste From. 5T ype the filename (including full path if necessary) and extension in the File Name box or browse to find the file you want. 6Click Open. Paradox places the contents of the file in the selected field. You can use Edit, Insert Object to paste files into OLE fields and objects. Spell checking your data The writing tools can help you with spelling and correct word usage when your are editing forms or tables. You can use Spell Checker to check form ortable fields for misspelled words and other writing errors, such as impropercapitalization or duplicate words. When Spell Checker finds a misspelledword, you can replace it with the suggested word, edit the word manually,skip the word, or add it to the dictionary so that Spell Checker recognizes itas a valid word. Customizing Spell Checker You can customize the way that Spell Checker searches for misspelled wordsor irregular capitalization. For example, you can have Spell Checker beep Entering and editing table data155 | 292806769-Paradox-9-Eng.pdf |
when it finds a possible spelling error. The options you enable remain effective for all spell checking sessions until you change them. To check for spelling errors 1Click the field you want to check. 2Click T ools, Spell Check. 3When Spell Checker stops on a word, click any of the available options, oredit the word in the Replace With box. A table or form must be open in Edit Data mode (click View, Edit Data)and a field must be selected before Spell Checker can be launched. To replace a misspelled word 1Click the field you want to check. 2Click T ools, Spell Check. 3When Spell Checker stops on a word and suggests replacements, choosethe word you want from the Replacements list box. 4Click Replace. If Spell Checker does not offer replacement words, click Skip, or edit textmanually in the Replace With box. To skip misspelled words You can instruct Spell Checker to skip over one or all occurrences of amisspelled word in your forms and tables. To skip a word once 1Click the field you want to check. 2Click T ools, Spell Check. 3When Spell Checker stops on a word, click Skip Once. Use this feature when Spell Checker identifies an occurrence of a word that you dont want to change. Spell Checker skips the currentoccurrence, but it will flag any other occurrences of the same word. 156 Paradox 9: Chapter 4 | 292806769-Paradox-9-Eng.pdf |
To skip all occurrences of a word when you check the spelling 1Click the field you want to check. 2Click T ools, Spell Check. 3When Spell Checker stops on a word, click Skip All. Spell Checker ignores the word for the rest of the spell-checking session. To edit text manually during a spell-check 1Click the field you want to check. 2Click T ools, Spell Check. 3When Spell Checker stops on a word, click in the Replace With box and type changes to the text. 4Click Replace in the Spell Checker window to continue. Using custom Spell Checker options You can set up Spell Checker to scan text for capitalization errors and wordswith numbers using the Options button. To check for words that contain both letters and numbers 1Click the field you want to check. 2Click T ools, Spell Check. 3Click the Options button. 4Enable the Check Words With Numbers option. 5Click Start. This option may not be available in all languages. To check for irregular capitalization 1Click the field you want to check. 2Click T ools, Spell Check. 3Click the Options button. 4Enable the Check irregular capitalization option. 5Click Start. Use this option to check for words with capital letters that do not begin a word (such as THe). This option may not be available in all languages. Entering and editing table data 157 | 292806769-Paradox-9-Eng.pdf |
To have Spell Checker beep on misspelled words 1Click the field you want to check. 2Click T ools, Spell Check. 3Click the Options button. 4Enable the Beep on misspelled option. 5Click Start. Choosing a Spell Checker language Every language has specific ways of formatting dates, time, currency symbols, and other text. You can use the Language feature to check for theformatting conventions of another language. For example, you can have Spell Checker format all the dates in your form or table in the language you choose (such as 12 avril 1996 for French). You do not need an additional language module to check formatting conventions in another language. However, if you want to check the spellingor grammar of a field in another language, you must purchase an additionallanguage module. To choose a language 1Click T ools, Spell Check. 2Click Options, Language. 3Choose a language from the list box and click OK. If you want this language to be the default language for Spell Checker,enable the Save As Default writing tools language option. Adding Words to Spell Checker When Spell Checker detects an unknown word such as a technical word orproper name, it treats it like a spelling error. You can add such a word to thedictionary so that Spell Checker will recognize it as a valid word. To add words 1Click T ools, Spell Check. 158 Paradox 9: Chapter 4 | 292806769-Paradox-9-Eng.pdf |
2When Spell Checker stops on a word that you want to add to the dictionary, click Add. Spell checker will no longer recognize the word as being misspelled. Working with graphic data Data in a graphic field can be any picture or graphic that is a scanned image, line art, or graphic file created in a paint or draw application. Paradox gives you two ways to place a graphic in a field: using the Cut, Copy, and Paste commands using the Paste From command T o paste a graphic into a graphic field, you enter Edit mode and paste the graphic from the Clipboard or a file. You cannot edit a graphic in Paradox; you must edit it in its sourceapplication. Placing a graphic using cut and paste or copy and paste With Paradox, you can find a graphic in another application, cut or copy it tothe Clipboard, and paste it into a Paradox graphic field. To place a graphic in a graphic field from a Windows application that supports the Clipboard 1Open the graphic file in its source application. 2Select the graphic and cut or copy it to the Clipboard. 3Open the Paradox table or form in which you want to place the graphic. 4Press F9 to enter Edit mode. 5Select the field into which you want to paste the graphic. 6Click Edit, Paste. Paradox places the graphic from the Clipboard into the graphic field. When you paste a graphic into a graphic field, Paradox converts the graphic into the. BMP file format. Entering and editing table data 159 | 292806769-Paradox-9-Eng.pdf |
Placing a graphic using Paste From Paradox lets you place. BMP,. PCX,. TIF,. GIF, JPG or. EPS graphic files directly into a graphic field without opening the graphics source application. Simply use the Edit, Paste From command. To place a graphic in a graphic field without using the Clipboard 1Click the field into which you want to place the graphic. 2Press F9 to enter Edit mode. 3Click Edit, Paste From. 4In the Paste From Graphic File dialog box, choose the graphic file youwant. 5Click Open. Paradox places the graphic in the graphic field. When you paste a graphic into a graphic field, Paradox converts the graphic into the. BMP file format. Finding and replacing data Use the Locate commands in the Record menu to find records, fields, andvalues in a table or form. Paradox provides two ways to quickly change existing field values in Edit mode or Memo View: Use the Replace command to change the value of a field. Use the Find and Replace command to change a string within a memo field or text object. You can use LIKE, NOT, EXACTLY, and other query operators to search fordata using queries. You can also use a CHANGETO query to replace fieldvalues. If youre working in the SQL Editor or IDE Editor, you can use Search, Find and Search, Replace to locate and replace text in SQL queries or Object PALscripts. Use the Locate commands on the Record menu in a table or run-time form window to find records and values in a table. You can include wildcards in asearch. 160 Paradox 9: Chapter 4 | 292806769-Paradox-9-Eng.pdf |
Using wildcards to help you locate values If you cant remember the exact spelling or syntax of the data you want to locate, you can use wildcards. Wildcards are operators that let you suggestpatterns for Paradox to search. For more information, see Wildcardcharacters on page 164. Locating a record number, field, or field value You can use the Locate command to locate (and move to) a table recordnumber, field, or value in a field. The record number of a Paradox table isassigned automatically by Paradox and cannot be edited. It shows therecords position in the table. When locating a value, Paradox moves to thefirst occurrence of the value that matches your search criteria. You can thenuse the Locate Next command to move to subsequent matches. You must first open the appropriate table in order to locate a record, field, or value. To locate a table record 1Click Record, Locate, Record Number. 2T ype the record number. To locate a field 1Click Record, Locate, Field. 2Choose the field name. To locate a value in a field 1Click Record, Locate, Value. 2Choose the field name. 3In the Value box, type the value you want to locate using any appropriateoperators. You also have the option of enabling one of the following: The Case-sensitive check box if you want Paradox to locate only matches that use the same capitalization as the value you typed. The Exact Match button if you are not using wildcard symbols in yoursearch. Entering and editing table data 161 | 292806769-Paradox-9-Eng.pdf |
The @ and.. button if you are using either of those two wildcards in your search. The Advanced Pattern Match button if you are using any of theextended list of Paradox wildcards (other than @ and..) in yoursearch. To locate the next record with the defined value Click Record, Locate Next to search for the next occurrence of the valueyou are searching for. You get improved performance if the field you use has an index. and thatthe Case setting matches the Locate operation. Locating and replacing values in a field With large amounts of data present in your database, finding particular piecesof information may seem a daunting prospect. However, Paradox allows youto locate and replace field values with little effort. To locate and replace values in a field 1Press F9 to change to Edit mode. 2Click Record, Locate, Replace. 3Choose the field you want to search. 4In the Value box, type the value you want to locate using any appropriateoperators. 5Enter the replacement value in the Replace With box. Paradox locates the first matching value. 6You also have the option of enabling one of the following:The Case-sensitive check box if you want Paradox to locate only matches that use the same capitalization as the value you typed. The Exact Match button if you are not using wildcard symbols in yoursearch. The @ and.. button if you are using either of those two wildcards inyour search. The Advanced Pattern Match button if you are using any of theextended list of Paradox wildcards (other than @ and..) in yoursearch. 162 Paradox 9: Chapter 4 | 292806769-Paradox-9-Eng.pdf |
To skip that occurrence of the value and locate the next occurrence Enable the Skip This Occurrence button. To replace that occurrence of the value and locate the nextoccurrence Enable the Change This Occurrence button. To replace all occurrences of the value Enable the Change All Occurrences button. Finding a particular record or value in a form or table If you cannot recall which field contains the value you are seeking, Paradox gives you the option of searching by record number and value as well as byfield. You can also specify a replacement value. To find a particular record or value in a form or table Click Record, Locate, then choose one of the following from the submenu: Command Action Field Move to the field you specify. (This command is available only fortables. ) Record number Move to the record number you specify. Value Move to a field value you specify. Replace Replace the specified value with another value you specify. To search for more occurrences of an item Click Record, Locate Next. Finding and replacing text in memo fields and text objects A memo field can be very large. With Paradox, you can find and replace textin memo fields and text objects when you have a table or form open. To find and replace text in a memo field, formatted memo field, or text object 1Press F9 to switch to Edit mode. 2Click the appropriate memo field to select it. Entering and editing table data 163 | 292806769-Paradox-9-Eng.pdf |
3Click View, Memo View. 4Select the text you want to search. 5Click Edit, Find And Replace. 6T ype the text you want to search for in the Search For box using appropriate wildcards. 7T ype the replacement text in the Replace With box. 8You may also enable either of the following: The Case-sensitive check box to search for the text exactly as you typed it, including capitalization. The Advanced Pattern Match check box if you used any wildcards inyour search. Paradox finds the first occurrence of the text. To replace that occurrence of the text Click Replace. To replace all occurrences of the text Click Replace All. You can also use the Find and Replace dialog box on text objects in boththe Form Design and Report Windows. Wildcard characters If you want to search a table but cant quite remember the data you areseeking, you can search by using patterns or wildcard characters. Forexample, say you want to find a customer named Elliott in your customertable but you cant remember exactly how the last name is spelled. It couldbe Elliott, Eliot, or Elliot. Paradox will allow you to specify the followingsearch pattern: El..t. Wildcard characters in sample search strings Wildcards are useful when you want to find data but cant remember exactlywhat or where that data is. Here are some examples of wildcard characters ina search string and what they find when you enable the Advanced Pattern Match option when searching for data. 164 Paradox 9: Chapter 4 | 292806769-Paradox-9-Eng.pdf |
Search string Locates co@l cool and coal, but not col s..ch search, scorch, and such ^any any only when it occurs at the start of a paragraph (when the Case-sensitive check box is disabled) able$ able only when it occurs at the end of a paragraph (and is not followedby a period) (success) success [success] Any s, u, c, or e [^success] Any character except s, u, c, or e a|(an) Either a or an (an is a group here) hands? hand and hands (hand with or without the s) suc?es? Sue when the Case-sensitive check box is disabled. The ? stands for onec or none at all, and one s or none at all. suc*es* success or Sue (when the Case-sensitive check box is disabled). The * stands for any number of cs or none at all, and any number of ss ornone at all. suc+es+ success only; the + stands for one or more cs and one or more ss 4\^2 4^2 (read four squared). Without the backslash, only paragraphsending in 4 followed by a paragraph starting with 2 would be found. apples\\pears apples\pears apples\\\\pears apples\\pears You can use ?, *, or + if you are not sure how to spell success. List of wildcards you can use to locate values You can use an extended set of wildcards in a search string when you enable Advanced Pattern Match in the Find And Replace and Locate And Replacedialog boxes. Wildcard Represents.. Any value ^ Beginning of field Entering and editing table data 165 | 292806769-Paradox-9-Eng.pdf |
$ End of field * Match none or more of the expression before the * + Match one or more of the expression before the + ? Match one or none of the expression before the ? | Match either the characters before or after the vertical bar [abc] Match any of the characters contained within the brackets [^abc] Match any characters not contained within the brackets (abc) A group (a series of literals) \ Use the following wildcard operator as a regular character \r Carriage return \n Line feed \t Tab \f Form feed For examples, see Wildcard characters on page 164. Entering data using table lookups The Table Lookup feature lets you refer to another table to look up the acceptable values for a field. This new table is called the Lookup Table. Onceyou know the correct value, you can enter it in the field or direct Paradox tofill in the value for you. Before Table Lookups can be used, you must define atable lookup on the field you will be entering values into. For informationabout defining and using a table lookup, see Table Lookups on page 69. If you are entering data in a table and come across a field that uses a table lookup, you may be able to view the lookup table and choose an appropriatevalue (if the Help and View option was selected), or you may not (if the Fill Only option was selected). This keeps your values secure. An authorizeduser will know the correct value. Locking records Paradox automatically locks a record when you start editing it and removesthe lock when you leave the record. A message appears in the Status Bar toinform you of these automatic locks. When you lock a record, other users canview it, but cant edit or delete it. Locking a record also prevents other usersfrom placing a read or write lock on the table and from performing anyoperations that require a read or exclusive lock (such as restructuring thetable). You can manually lock a record. 166 Paradox 9: Chapter 4 | 292806769-Paradox-9-Eng.pdf |
Locking and unlocking records With Paradox, you can maintain data security by putting a lock on a record. You can unlock the record when you want it accessible to other users. To manually lock a record 1Open a table and press F9 to switch to Edit mode. 2Select a table record. 3Click Record, Lock. The Status Bar tells you that the record is locked. Paradox automatically unlocks a record when you move off of it or switch from Edit mode to View mode. To unlock a record 1Select a locked table record. 2Click Record, Unlock. If you have manually locked a record, you will have to unlock the record torelease the record for other users to be able to edit or delete the record. Ifyou try to edit a record and discover that it has been locked by anotheruser, you can look at the Status Bar to see the name of the user who haslocked the record. You can also lock a record by selecting the record and pressing F5 or CTRL + L. Posting a record without unlocking it Paradox automatically saves (posts) any changes you make when you leavethe record, but you can save your edits before you leave the record. To post a record without unlocking it Click Record, Post/Keep Locked. Entering and editing table data 167 | 292806769-Paradox-9-Eng.pdf |
Sometimes Paradox moves a record to a different location when you post it. This happens if the table is keyed and the new record is not in itscorrect location in the table. Paradox moves the record to its correctlocation. When you click Record, Post/Keep Locked, the moved recordremains active, and Paradox updates your view of the table if necessary. 168 Paradox 9: Chapter 4 | 292806769-Paradox-9-Eng.pdf |
Forms and reports 169FORMS AND REPORTS 5 You can use forms and reports, also called design documents, to organize and present your data in a variety of formats. For example, you can create formsand reports that display one record at a time display multiple records at a time display only certain fields of a table contain design features, such as lines, boxes, graphics, shading, or special colors perform on-screen calculations Forms and reports can also link tables, so that information stored in separatetables appears together. The primary difference between forms and reports is that forms are also editing tools. They let you display and edit the data in your tables. Anychange you make in a form is reflected in the corresponding table(s). Forexample, you can create forms that add data to several tables at once. Reports are printing tools. They let you format and print your data. For example, you can use reports to create form letters, mailing labels, invoices,and presentations. | 292806769-Paradox-9-Eng.pdf |
Creating forms and reports Creating a form or report typically involves following general steps: 1Creating a data model. 2Creating a layout. 3Placing design objects in a document. Creating a form or report using the experts You can use the Paradox Experts to create forms, reports, or mailing labels. Some functions of Paradox, such as creating mailing labels, are performedmore easily using the experts. Other functions, such as performing a mailmerge, require the use of experts. To create a form using an expert 1Click T ools, Experts. 2Double-click the Form icon. 3Follow the instructions in the Form expert. To create a report using an expert 1Click T ools, Experts. 2Double-click the Report icon. 3Follow the instructions in the Report expert. To create mailing labels using an expert 1Click T ools, Experts. 2Double-click the Mailing Label icon. 3Follow the instructions in the Label expert. If you want Paradox to run the Expert automatically whenever you createa new form or report, click T ools, Settings, Preferences to open the Preferences dialog box, click the Forms/Reports page, and enable the Always Use Expert option. 170 Paradox 9: Chapter 5 | 292806769-Paradox-9-Eng.pdf |
Creating data models A data model is the graphical representation of the relationships between tables. Data Models provide a simple way of telling Paradox which tablesdata to display and work with, and how these tables are linked. Data models exist in two ways:As part of a form or report. When you create a form or report, you need to tell Paradox which tables to use and how the tables are linked (on whichfields). When you create a data model for the purpose of creating a form orreport, you use the Data Model Dialog box. As a separate file. You can create a data model separately, without creatinga form or report. This type of data model is created in the Data Model Designer. You can create it for use at a later time. These data models aresaved with a. DM extension. A data model can be based on a single table, or on multiple tables. T o useinformation on a form, report, or query from more than one table, you mustcreate a multi-table data model. You can define relationships between thetables by linking them together. Single-table data models A data model based on only one table is a single table data model. This typeof data model is used to create forms and reports where you only need thedata from one table. However, if referential integrity has been declaredbetween this table and a table which is not present in the data model, youmay encounter problems if you attempt to edit the forms data in a mannerwhich would violate this integrity. Multi-table data models A data model based on more than one table is a multi-table data model. Whenyou place more than one table on a data model, one table is defined as themaster table and can be linked to one or more detail tables. After you openthe Data Model Designer or the Data Model dialog box, you can define therelationship between the tables. You can use the mouse to draw a linebetween the fields in the tables. Or, if the fields do not match, the Link Property dialog box appears and you can select the fields you want to link. If you have established referential integrity between the two tables you are linking, Paradox automatically creates the link when you draw the linebetween the two tables. If you do not have referential integrity betweenthe tables you are linking, you need to create the link in the Link Propertydialog box. The Link Property dialog box appears once you haveattempted to link unmatched fields. For more information, see Linkingtables in a data model on page 174. Forms and reports 171 | 292806769-Paradox-9-Eng.pdf |
Drawing a line from the first table to the second table makes the first table the master table and the second table the detail table. If you draw a line fromthe second table to the first table, the second table becomes the master tableand the first table becomes the detail table. The arrow shows the direction ofthe link. The arrow always points to the detail table. The type of relationship created between two tables depends on the matching of the detail tables indexes to the master tables file structure: A double-headed arrow indicates a multi-value relationship (one-to-many). A single-headed arrow indicates a single-value relationship (one-to-one or many-to-one). Complex Data Models Complex data models can include a combination of single-value relationshipsand multi-value relationships. You can keep linking tables in the existing datamodel until you have the data model you want. As long as you have identifiedindexes properly, you can build data models that are as complex as you needthem to be. For information see Indexes on page 58 and Defining keyfields on page 56. You might prefer to link the tables as you add them to the data model, rather than adding them all and then linking. This way, you can avoid scrolling thedata model panel to view all the tables. For information see Creating a linkon page 176. Data Models for reports with groups When creating data models for reports with group bands, you might want toconsider linking the tables backwards, from detail table to master table,rather than in the conventional way of master table to detail table. This givesyou more choices of fields to group by when adding a group band to thereport. Suppose, you create a report based on a data model using the tables Customer, Orders, and Lineitem. If you connect these tables in the usual way, Customer Orders Lineitem (creating a multi-value relationship), when you add a group band to the report, the Define Group dialog box makesavailable only the fields from the Customer table as choices for the Group By Field Value. Creating and opening a data model Paradox provides two methods to create data models. When you want to openor create a data model, you do so in either the Data Model dialog box or the Data Model Designer. The Data Model dialog box and the Data Model Designer allow you to do similar things. The main difference is that when 172 Paradox 9: Chapter 5 | 292806769-Paradox-9-Eng.pdf |
you are creating a data model in conjunction with a form or report, you open the Data Model dialog box; when creating a data model separately or fromscratch, you open the Data Model Designer. It is recommended that if youare opening a data model not attached to any specific form or report, you doso in the Data Model Designer. You can use the Data Model Designer or the Data Model dialog box tomodify the data model of a design document display an independent data model, or (in the Data Model dialog box only) display the data model of the active form or report In addition to the above, the Data Model Designer allows you to create a data model without creating a form, report, or query print data models Creating a data model in the Data Model dialog box You can use the Data Model dialog box to create data models based on tables, queries, or previously created data models. When you place a query in the data model panel of the Data Model dialog box, Paradox creates the form or report based on the query. Instead ofrunning a query and building a design from the resulting Answer table, youcreate the design based on the query itself. When you run a form or reportbased on a query, Paradox runs the query, then displays or prints thedocument. To create a data model based on table(s) 1Open the Data Model dialog box, click Format, Data Model. 2Choose Tables from the list box. 3Double click the table(s) to the workspace. 4Drag the tables to arrange them on the workspace. 5Link the tables by dragging one record from master table to the detailstable. For information, Creating a link on page 176. 6T o save the data model, click OK. 7T o save the data model to the Data Model Designer, click save DM. To create a design document based on a query 1Open the Data Model dialog box, click Format, Data Model. 2Choose Queries from the T ype list box. Forms and reports 173 | 292806769-Paradox-9-Eng.pdf |
3Double click the queries to the workspace. 4T o save, click OK. A query must be the master table in a multi-table design. Tables are placed on the workspace stacked one on top of the other, you can arrange the tables to suit your needs. When you save the data model,the layout of the tables is saved. Creating a data model in the Data Model Designer You can use the Data Model Designer to create and save a data modelindependently of other database objects. You can then use this data model asa basis for database design, including form and report layout. To create a data model based on table(s) 1Open the Data Model Designer, click File, New, Data Model. 2Choose Table from the list box at the bottom of the Add Object dialog box. 3Select a table from the list and click Add. 4Drag the tables to arrange them on the workspace. 5Link the tables just as you would using the Data Model dialog box. Forinformation, see Creating a link on page 176. 6Click File, Save or File, Save As. 7T ype a name for the data model in the File Name box. When you save the data model, the layout of the tables is saved. Linking tables in a data model Links allow you to relate the data from two or more tables in a designdocument. T o understand how Paradox links tables in forms and reports you must first understand how Paradox sorts and locates data based on the indexes (keysand secondary indexes) you specify. For information see Defining key fieldson page 56 and Indexes on page 58. You create links on common fields. For example, the Customer table has a Customer No field and the Orders table has a Customer No field, so you can 174 Paradox 9: Chapter 5 | 292806769-Paradox-9-Eng.pdf |
link these two tables on that field. In Paradox tables, the field name does not have to be the same in both tables, but the field type and size must match. For example, suppose you are creating a data model that uses the sample Customer and Orders tables. Both tables have a Customer No field. The Customer No field in the Orders table contains values that represent recordsin the Customer table. Its easier and more efficient to keep order andcustomer information in separate tables. But sometimes you need to see datafrom both tables at once. Thats when you need to link the two tables. Whenyou link Customer and Orders, Paradox looks at each value in the Customer No field of Customer and, using indexes, finds matching values in the Customer No field of Orders. This way, you can tell which customer madeeach order. Paradox uses an index to remember where values are. When you create a secondary index on a field, Paradox looks at each value in the field andcreates a file that notes each values location (record number) in the table. The index enables Paradox to locate records quickly and easily. If you createa maintained index, Paradox updates the index file every time you update thetable. When you link two tables, Paradox evaluates a value in the table you are linking from (the master table) and finds all matching values in the table towhich you are linking (the detail table). Therefore, the detail table must beindexed on the field on which you want to link. The detail table can haveeither a primary index (key) or maintained secondary index on the linkingfield. For example, you can link the Customer table to the Orders table on the Customer No field if you have an index on that field in the detail table. Thiswould be a one-to-many link, because for every customer record you couldhave zero or more corresponding records in the Orders table. Or, you can linkthe Orders table to the Customer table on the Customer No field (theprimary index of the Customer table). This would be a many-to-one link,because for every order there is one and only one corresponding record inthe Customer table. Types of links You can link tables through either: Single-value relationships (one-to-one or many-to-one) Multi-value relationships (one-to-many) When you create a database, all the tables should be saved in the same directory, including lookup tables. Although the Data Model allows you tomove from alias to alias, you should not link tables from two different Forms and reports175 | 292806769-Paradox-9-Eng.pdf |
databases or create a lookup between tables from different databases. The concept of a relational database is one where only tables within the samedirectory are linked. In d BASE tables, you can link only on like field types, unless you use anexpression index in the link. Understanding links and indexes Single-value relationships A single-value relationship exists between tables if, for every record in onetable, there are no related records or only one record in the other table towhich it is related. For example, the relationship between the sample Lineitem and Stock tables is single-value: each line item ordered (eachunique value in Lineitem) is one item of stock (a unique value in Stock). When tables in Paradox have a single-value link, Paradox treats the fields in both tables much as if they came from the same table. You can group ontables joined by a single-value relationship. They can be displayed in thesame table object or multi-record object. In a many-to-one relationship, many records in the master table are related to one value in the detail table. For example, the Lineitem table lists specificitems that a customer orders. Several items can be ordered at the same time,so many Lineitem records can point to the same Orders value. Multi-value relationships A multi-value relationship exists between tables if, for every record in themaster table, no records, one record, or more than one record from anothertable is related to it. For example, one customer (one record in the sample Customer table) can place no orders, one order, or many orders (records inthe sample Orders table). Therefore, each record in the Customer table canhave many records in the Orders table that match it. T wo tables containing identical key fields have a one-to-one relationship. When this condition exists, it is wise to combine these tables into a singletable. Creating a link You can link tables while creating either a design document or a data model. Linking tables adds information from the tables to your design document. 176 Paradox 9: Chapter 5 | 292806769-Paradox-9-Eng.pdf |
To link two Paradox tables 1Open the Data Model Designer or the Data Model dialog box. 2Click the master table and drag a field to the detail table. In some cases, Paradox creates the link immediately. Paradox does this if referential integrity exists between the two tables. You can click OK toaccept this link. If referential integrity does not exist, you need to definethe link using the Link Property dialog box. 3T o define the link, right-click and choose Link Property. If you attempt tolink fields which do not have a previously established link, the Link Property dialog box will appear. 4Click the add or remove buttons to select the master table field (parentfield) that matches the selected Child Index. 5Click OK to accept the link and return to the Data Model dialog box or Data Model Designer. You cannot create a link using BLOB, bytes, or logical fields because youcannot create an index on these field types. Defining or removing a link In the Define Link dialog box, Paradox shows all fields from the master tablein the Field list. To define a link 1Open a data model. 2Drag the field on which you want to link the details table to the mastertable. If Paradox finds an index of the detail table that matches the name and type of the field youve chosen, Paradox completes the link for you. If no name and type match is found, the Link Property dialog box isopened and Paradox uses the first index of the detail table that matchesin type and length if applicable. You can choose another index toreplace the automatic choice. 3Select the index you want to use for the detail table from the Index list. Forms and reports 177 | 292806769-Paradox-9-Eng.pdf |
If youre using a composite key or index on the detail table, select fields from the master table to match some or all of the fields in theindex. If you use a composite key or index and match all its fields, Paradoxcreates a one-to-one link. Otherwise, Paradox creates a one-to-manylink. To remove an existing link between tables in a data model 1Right-click the link. 2Click Unlink. Modifying a link After you choose a matching field from the master table and an index fromthe detail table in the Link Property dialog box, Paradox creates a linkbetween the two. To link tables using a different field or index 1In the Data Model Designer or Data Model dialog box, click the arrow,right-click Unlink. 2Drag a field or index from the master to the detail table. The data model shows what type of link exists between the tables. T wo tables linked with a double-headed arrow have a multi-value relationship. The direction of the arrow shows the direction of the link(master-to-detail). Tables linked with a single-headed arrow have a single-valuerelationship. Adding or Removing a table from a data model You can add or remove tables in either your current data model in a form orreport, or in a saved data model. When working in a form or report, use the Data Model dialog box. The changes are reflected in your current form orreport immediately. You can make changes to a saved data model in the Data Model Designer to use independently of a specific design document. To add a table to a data model in the Data Model Designer 1Click File, Open, Data Model. 2Select a data model file and click the Open button. 178 Paradox 9: Chapter 5 | 292806769-Paradox-9-Eng.pdf |
3Click Edit, Add Object. 4Double click the table(s) you want to add or select a table and click the Add button, then click OK. To add a table to a data model in the Data Model dialog box 1Open the Data Model dialog box, Format, Data Model. 2Double click the table(s) you want to add. To remove a table from the data model In the Data Model Dialog box or Data Model Designer, right-click thetable, and choose Remove Table. Master tables cannot be deleted from the data model. You must firstunlink them. Viewing data models Data models can be viewed attached to the currently active form or report, aswell as data models that are not attached to any particular document. Datamodels may be viewed either in the Data Model Designer or in the Data Model dialog box. Viewing a data model You can view a data model in the Data Model Designer, or as part of an activeform or report. To view a data model in the Data Model Designer 1Click Open, Data Model. 2Select the data model you want to view from the Select File dialog box. 3Click the Open button. To view the data model of an active form or report. Click Format, Data Model. Forms and reports 179 | 292806769-Paradox-9-Eng.pdf |
The tables appear in tile formation in both the Data Model Designer and the Data Model dialog box. You can arrange the tables by dragging eachone individually. When you save the data model, the layout of the tables issaved as well. Viewing table properties in the Data Model dialog box If you are designing a form or report, you can view a tables name and its fieldnames. You can also display or modify the following properties for forms:table alias, read-only, strict-translation, and auto-append. For both forms andreports, you can display and modify the filter property. Table Alias Opens a Table Name dialog box where you can specify a table alias for a tablein a data model. Filter Opens the Filter Tables dialog box, where you can set a filter for the table toview only the data that meets your specifications. Read-Only Protects the table from being edited in this form. You can still edit the tablein other documents or in its Table window. Strict Translation This property restricts the characters that you can input into a table to thosewhich are actually in the character set of the tables language driver. Stricttranslation is enabled by default. Auto-Append Automatically creates a new, blank record whenever you move beyond thelast record in the table. Auto-append is enabled by default. To view table properties in the Data Model dialog box 1Open a form in the Design Window. 2Click Format, Data Model. 3Right-click the table in the panel. 4Choose a property 180 Paradox 9: Chapter 5 | 292806769-Paradox-9-Eng.pdf |
When you save a data model, Paradox saves the properties youve specified for each table in the data model. You can save the same datamodel with different properties to suit all your needs. Using table aliases You can assign a different name, called and alias, to a table. Table aliases canprovide the following benefits: If you use the same table more than once in a data model, table aliases help you avoid confusion. A form or report is more portable when you use table aliases. You can change table aliases to conform to the naming conventions of your SQL server when you upsize your application. You can refer to tables in Object PAL code using table aliases. This meansyou can change the table your code refers to without breaking the code orrequiring table name modifications. You can use table aliases instead of table names when you create calculatedfields. If you need to change tables, you can keep the calculated fieldexpressions by assigning the table alias to the new table. Creating or removing a table alias A table alias must contain an alpha character as its first character, cannotcontain spaces, and can be up to 32 characters in length. To create a table alias 1Right-click the table in the Data Model dialog box or Data Model Designer, and click Table Alias. 2T ype an alias for the table in the Table Name dialog box. To Remove a table alias 1Right-click the table in the Data Model dialog box or Data Model Designer, and click Table Alias. 2Delete the table alias in the Table Name dialog box. You can only add or remove a table alias in Design Mode. Forms and reports 181 | 292806769-Paradox-9-Eng.pdf |
Saving and printing a data model Paradox lets you save or print your data model, whether it is a stand alone document, or is linked to the active form or report. In the Data Model dialogbox you can save the data model for the active form or report, or you cansave a data model separately in the Data Model Designer. If you want to use apreviously created data model, you can modify it and save the modified datamodel under a different name. Applying or canceling changes to the data model of the active form or report While designing a form or report, you can change your data model including adding or removing tables, and creating or removing links betweentables. You can choose to apply these changes to your data model, or toremove them if they do not suit your needs. To apply changes to the data model of the active form or report In the Data Model dialog box or Data Model Designer, click OK. To cancel changes to the data model of a form or report In the Data Model dialog box or Data Model Designer, click Cancel. Saving changes to the Data Model Designer You can make changes to the Data Model Designer and modify the currentdata model or save it under a new name to use separate from a specific formor report. To save the data model with its current name In the Data Model Designer, click File, Save. To rename a data model 1In the Data Model Designer, click File, Save As. 2T ype a name for the data model in the File Name box. Paradox saves the data model with the. DM file extension. Printing a data model You can only print a data model in the Data Model Designer. T o print a data model attached to a form or report, save the data model with a. DM 182 Paradox 9: Chapter 5 | 292806769-Paradox-9-Eng.pdf |
extension in the Data Model dialog box and print it from the Data Model Designer. To print a data model in the Data Model Designer Click File, Print. Right-click and choose Print Preview to view the current data modelbefore printing. Laying out forms and reports When you create a form or report layout, you specify the style of the masterand detail records and which fields you want to display in the document. Youthen choose a style sheet to establish the default properties of designobjects. You use the Design Layout dialog box to create and modify your layouts. This dialog box has different options for linked-table documents and unlinked-tabledocuments. The documents data model determines which Design Layoutdialog box is displayed. Most options available for design layouts are thesame for forms and reports. The only differences are the way the previewimage is displayed and the choice of style sheets. Reports Reports use bands to separate different areas of the layout. Reports havebands for report headers and footers, page headers and footers, groups thatsort the data, and the body of the report. The Design Layout dialog box shows report bands when you preview a report layout. Paradox places the contents of your reports data model withinthe record band. Forms Forms dont use bands; therefore, the preview area in the Design Layoutdialog box for a form is blank except for the contents of your forms datamodel. Specifying an initial layout There are two main options when creating a design document: single-recordlayouts and multi-record layouts. Table layout is a multi-record layout wherethe data appears in tabular form rather than in groups of fields sorted by thekey field. Forms and reports 183 | 292806769-Paradox-9-Eng.pdf |
Understanding single-record objects A single-record object displays one record at a time, meaning that each page of your form or report only contains the data from one row or record of thetable on which it is based. This format is convenient when the table in yourdata model has records with large amounts of information (such as a memofield) or has a physically large field (such as an OLE or graphic). Understanding multi-record objects A multi-record object displays several records at a time by using a field layoutthat repeats a specified number of times horizontally and vertically on thepage. You can place fields in any pattern. You define the field layout for onerecord and then specify how many records across and down you want. A common use of a multi-record object is to create mailing labels. Each label is a group of fields (such as Name, Address, City, State, and Zip) in a layout,repeated for each record. The following figure shows the design for amulti-record report that uses fields from the sample Customer table. In the master record region, define the field objects and arrange them in the layout you want. The gray record regions show where Paradox will place additional records. When you print or preview this report, Paradox repeats the pattern of thefields in the master record region for every record in the Customer table. The record object inside the multi-record object is a container for therecords. If you make the record object too small, Paradox will eliminatefields in the Define Multi-record Object dialog box (right-click menu) tomake the record fit the container. T o resize the records, select the masterrecord region and drag any of its selection handles. Because all recordregions in the multi-record object are the same size, Paradox resizes thegray repeating regions along with the master record region. 184 Paradox 9: Chapter 5 | 292806769-Paradox-9-Eng.pdf |
Opening the Design Layout dialog box The first step when you specify the initial layout for a form or report is to open the Design Layout dialog box. You cannot open the Design Layoutdialog box until you create a data model for the form or report. The Design Layout dialog box is an excellent aid to laying out your design, but it is only astarting point. You can change the design in a Design Window after you closethe Design Layout dialog box. To open the Design Layout dialog box from the Data Model dialog box 1Click File, New, Form or Report. 2Click the Data Model button. 3Use the Data Model dialog box to create the data model. When you click OK, Paradox opens the Design Layout dialog box. To open the Design Layout dialog box from a blank form or report 1Click File, New, Form or Report. 2Click the Blank button to open a blank form or report. 3Click Format, Data Model. 4Select Data Models from the list box at the bottom of the Table Palette. 5Double click a data model. 6Click OK. 7Click Format, Layout. To return to the Design Layout dialog box from a Design Window Click Format, Layout. Depending on the options selected in the Forms/Reports page of the Preferences dialog box (T ools, Settings menu), you might not see the New Form or New Report dialog box when you click File, New. Depending onyour preference setting, you might see the Data Model dialog boxautomatically, or you might open an Expert or a blank document. Forms and reports 185 | 292806769-Paradox-9-Eng.pdf |
Choosing a layout style You specify the initial layout from the Design Layout dialog box, and then refine the layout in the Design Window. If youre working with a multi-tabledesign, the layout style you choose is for the master table. To choose a layout style 1Open a form or report in the Design Window. 2Click Format, Layout. 3In the Design Layout dialog box, enable one of the following buttons: Single-Recorddisplays one record of the table at a time in a free-form layout. Tabulardisplays rows and columns as if you were working with thetable itself. Multi-Recorddisplays several records of the table at a time. Blankremoves all fields from the design. Selecting fields to display When you create a design document, Paradox includes all fields from all thetables you link to the master table of the document (except for a duplicatedfield between a linked master and detail table, which is shown only once inthe master table). You can select which fields to display by using the Fields page of the Design Layout dialog box. To remove a field from the design 1Open a form or report in the Design Window. 2Click Format, Layout. 3In the Design Layout dialog box, click the Fields page. 4Choose the appropriate table from the Table list box. 5Select the field you want to remove from the Selected Fields list. 6Click Remove Field. To change the order of fields in the design 1Follow steps 1 to 4 of the preceding procedure. 186 Paradox 9: Chapter 5 | 292806769-Paradox-9-Eng.pdf |
2Select the field whose position you want to change. 3Click the Up arrow to move fields up the list, or click the Down arrow to move fields down the list. To reset fields Click the Reset Fields button on the Fields page of the Design Layoutdialog box. Paradox redisplays all removed fields. All changes you make in the Design Layout dialog box can be modified in a Design Window. You can replace removed fields in the Design Windowwith the Field tool. Paradox only displays fields from the master table and tables you linked toit in the Design Layout dialog box. You can add fields from unlinked tablesto your design in the Design Window by using the Field tool. For reports, Paradox also adds fields for the date, the page number, andthe title. You cannot remove these fields in the Design Layout dialog box;you must remove them in the Report Design Window. Displaying fields in columns or rows For single-record or multi-record layouts, you can display fields in columns orby rows. To display fields in columns or rows 1Open a form or report in the Design Window. 2Click Format, Layout. 3In the Design Layout dialog box, enable one of the following buttons: Single-Recorddisplays one record of the table at a time in a free-form layout. Multi-Recorddisplays several records at a time. Forms and reports 187 | 292806769-Paradox-9-Eng.pdf |
4Enable one of the following buttons: By Columnsdisplays fields in a top-to-bottom column along the left side of the screen. Paradox creates columns as needed until all fieldsare displayed, and creates additional page images if necessary. The By Rowsdisplays fields one after another in a row along the topof the screen. Paradox creates additional rows as needed until allfields are displayed, and creates additional page images if necessary. Hiding or showing field labels You can specify whether or not your forms or reports have field labels. A fieldlabel is a text object that contains the field name. To hide or show field labels 1Open a form or report in the Design Window. 2Click Format, Layout. 3Enable or Disable the Label Fields check box to hide field labels. This option is unavailable in a tabular design. In the Design Layout dialog box, you specify how you want the fields to bedisplayed by default. In a Design Window, you can right-click individualfields to turn the display of field labels on or off. Using style sheets Style sheets give your forms and reports a consistent appearance. You cancreate a style sheet to set the color, size, and style of all of the design objects,such as buttons, boxes, and fields that you use to create forms and reports. You can also choose one of the many style sheets included with Paradox. You can choose a style sheet using the Design Layout dialog box. To choose a style sheet 1Open a form or report in the Design Window. 2Click Format, Layout. 188 Paradox 9: Chapter 5 | 292806769-Paradox-9-Eng.pdf |
3In the Design Layout dialog box, choose a style sheet from the Style Sheet list box. Paradox provides several style sheets, but you can also create your own style sheets. If you have created a form or report with features you wishto use for future documents, you can save those features as a style sheet. To save a created style sheet 1Click Format, Style Sheet. 2Enter the name and the path of the style sheet you want to save. If your style sheet is designed for the screen it should have an extension of. FT If your style sheet is designed for the printer it should have anextension of. FP 3Click Save. Multi-table layouts When you have more than one table in your data model you require amulti-table layout. Paradox allows you to display the information from yourtables in tabular or field format, and gives you several options for how thetables and/or fields should be laid out. You also have the option of nesting therecords, that is placing the detail records inside the multi-record object. Displaying objects in columns or rows When working with multi-table design layouts, you can display objects(whether they are fields, tables, or multi-record objects) either as columns oras rows. To display objects in columns or rows (multi-table design) 1Open a form or report in the Design Window. 2Click Format, Layout. 3In the Design Layout dialog box, enable one of the following buttons: Single-Recorddisplays one record of the table at a time in a free-form layout. Multi-Recorddisplays several records at a time. Forms and reports 189 | 292806769-Paradox-9-Eng.pdf |
4Enable one of the following buttons: By Columnsdisplays fields in a top-to-bottom column along the left side of the screen. Paradox creates columns as needed until all fieldsare displayed, and creates additional page images if necessary. By Rowsdisplays fields in a left-to-right row along the top of thescreen. Paradox creates rows as needed until all fields are displayed,and creates additional page images if necessary. Displaying master and detail records You specify the style used to display master and detail records in the Design Layout dialog box, then refine the layout in the Design Window. The defaultplacement for detail records is before the associated master records. In amulti-table design, you can place master records before unnested detailtables. To display several master records at the same time 1Open a form or report in the Design Window. 2Click Format, Layout. 3Enable either Tabular or Multi-record to display more than one record at atime from the master table. To show detail tables 1Open a form or report which is made up of a one-to-many relationship datamodel in the Design Window. 2Click Format, Layout. 3Click the Detail Tables page. 4Enable one of the following buttons: Tabledisplays detail tables in rows and columns as if you were working with the table itself. Recorddisplays several records at a time. 5If you enabled Record in step 4, enable one of the following buttons: Horizontaldisplays multiple records across the page. Verticaldisplays multiple records down the page. Bothdisplays multiple records across and down the page. 190 Paradox 9: Chapter 5 | 292806769-Paradox-9-Eng.pdf |
To place master records before detail tables 1Open a form or report which is made up of a one-to-many relationship in the Design Window. 2Click Format, Layout. 3Enable Single record. 4Enable the Fields Before Tables check box to display master recordsbefore any related detail tables. In a form, master records can be displayed in either the tabular style orthe multi-record style. Detail records can be either nested in the mastermulti-record object or separate from either a master table or multi-recordobject. In a report, the master records are always displayed in the multi-recordstyle, and the detail records can be displayed in either a table or amulti-record object nested in the master multi-record object. The Details tab is only available when the form or report is made up of aone-to-many relationship. Nesting detail records In a one-to-many form design, you can display master records in amulti-record object and place detail records inside that multi-record object. This is called nesting detail records within the master. The detail tables aredisplayed in a multi-record object or a table, depending on the option youenable on the Detail Tables page of the Design Layout dialog box. If you arecreating a report from a multi-record object form design, the detail recordsmust be nested. When you design a report layout, Paradox automatically nests detail objects within master objects whenever you display several master records. Becausenesting is automatic and required, the Nested option does not appear in themulti-table Design Layout dialog box for a multi-table report. Try to structure your report design so that a record appears on a single page. If you have many detail records for each master record, or many levels ofnesting, you should make sure that all detail records will fit on a single pagebefore running the report. You can do this by limiting the size or number ofdetail records. Forms and reports 191 | 292806769-Paradox-9-Eng.pdf |
To nest detail records in a form 1Open a form or report which contains a one-to-many relationship in the Design Window. 2Click Format, Layout. 3Enable Multi-record to display more than one record at a time from themaster table. 4Enable the Nested check box. To limit the size or number of detail records in a report 1Open a report in the Design Window. 2Right-click the table or multi-record object that contains the detail recordsand click Properties. 3Click the Run Time page. 4Disable the Show All Records check box. 5Click View, View Data to run the form and notice that you dont see all thedata. 6On the Run Time page of the Properties dialog box, enable the Show All Records check box. Run the form. This time the detail table expands to include all the data. Using the form and report design window Use the Design Window to create or modify the design of a form or report. The Form and Report Design Windows are the same, except that you useone to create and modify forms; you use the other to create and modifyreports. T o help you create your desired form or report, use the following: Design Window toolbar to place tools on a form or report. Design Window ruler to place, resize, or move design objects. Design Window grid to align the placement of design objects. Set designer preferences to establish the behavior and display of the Design Window. Style sheets to set a consistent appearance for multiple forms or reports. Set default Design Window preferences to create a default design windowwhen creating new forms and reports. 192 Paradox 9: Chapter 5 | 292806769-Paradox-9-Eng.pdf |
Design Window toolbars The T oolbar in a Form Design or Report Design Window contains design tools that you use to place design objects on a form or report. The name ofeach tool appears as a tool tip. You can use the design tools on the toolbar to create a single object, or, you can keep the tool active and create multiple objects of the same kind. For details about design objects, see Using design objects in forms and reports on page 206. Using the Design Window toolbars You can select which toolbars you want displayed while you are working,allowing you to customize your workspace. The tools on the toolbars can beused to create design objects of almost any size, shape, or function. To display a Toolbar Enable one of the following: Click View, T oolbars and enable the T oolbars you want to display. Right-click the empty area on any T oolbar and enable the T oolbars you want to display. To create an object on a form or report using the Toolbar design tools 1T o create a single object of any type, click the tool you want. 2Do one of the following: Click the design to place the object at its default size. Click the design and drag to place the object and specify its size. Press SHIFT, and click in the design and drag to constrain the object. When you constrain a box, it becomes a square; an ellipse becomes a circle; a line is forced to be horizontal, vertical, or at a 45-degree angle; allother objects (buttons, fields) become square. T o create more than one object of the same type, hold down SHIFT whileyou click the tool you want. The tool remains active until you click theselection arrow or another tool. Forms and reports 193 | 292806769-Paradox-9-Eng.pdf |
Changing a tools properties You can change the default properties of any design tool on the T oolbar. Changes you make using Copy T o T oolbar last only for the current session. T o make permanent changes to design tools, save the design as a style sheet. To change a tools properties 1Place the object on the design document. 2Right-click the object and click Properties. 3Use the Properties dialog box to change any of the tool properties. 4With the Properties dialog box still open, right-click the object again andclick Copy T o T oolbar. The properties you set for the object are copied to its tool on the T oolbar. These properties are used as defaults for any subsequent objects createdwith that tool. To save a new style sheet Click Format, Style Sheet and save the current style sheet as a new stylesheet. Copying page or design object properties to the Toolbar You can change the forms page properties, such as color or pattern, and copythem to the T oolbar. Paradox saves page properties the same way it savesdesign-tool properties. Every time you create a new form, it will have thesame properties as those you saved. You can change the properties of individual components of a composite design object. For example, you can change the properties of a field that iscontained by a table frame, then copy the table frame to the T oolbar. All fieldsin table frames you subsequently place will have the properties that you set. When you copy composite design objects to the T oolbar, you can customize the following components: table frames headers, records, and fields multi-record objects record and fields fields edit region and text label crosstabs text labels, fields, and cell regions buttons text labels 194 Paradox 9: Chapter 5 | 292806769-Paradox-9-Eng.pdf |