VERSIONS: P5, P7
SUBJECT: Frequently asked questions - forms
BY: BORLAND
FAQs about forms
This FAQ is divided into the following sections:
- Troubleshooting questions that apply to all versions
- Form design questions that apply to all versions
- ObjectPAL forms questions that apply to all versions
- Questions that apply to Paradox 7 (16-bit and 32- bit)
- Questions that apply only to 32-bit Paradox
TROUBLESHOOTING QUESTIONS THAT APPLY TO ALL VERSIONS
Q: WHEN I DEFINE A FIELD ON MY FORM, PARADOX ONLY ALLOWS ME TO USE SUMMARY OPERATORS LIKE COUNT OR
SUM. PARADOX WILL NOT ALLOW ME TO DEFINE JUST THE FIELD. WHY?
A: Whenever a field from a detail table is used, the field object must be contained within a table frame or multi-record object. This is because
of the one-to-many relationship. Essentially, you are not able to display many records within the single record object. If you try, Paradox assumes
you are creating a summary field.
Q: WHY CAN'T I DELIVER MY FORM?
A: You must first save your form before you can deliver it. Once you save your form, the Deliver option will be available on the File
menu.
Q: I AM GETTING GARBLED OR STRANGE FONTS IN MY FORMS. (THIS COULD BE TEXT IN A TABLE FRAME BECOMING
GARBLED OR STRIPES OF COLORS APPEARING RANDOMLY ON THE FORM, ETC).
A: This type of problem is usually due to the video driver. Try using a video driver that came with Windows, like VGA.
Q: I NOTICED THAT WHEN I'M RUNNING A FORM AND I PRESS THE ENTER KEY, PARADOX SEEMS TO INSERT A NEW
RECORD. IS THERE ANY WAY TO MAKE RECORD INSERTIONS HAPPEN ONLY WHEN THE USER PRESSES THE INSERT KEY?
A: Make sure the Auto-Append property is not selected. To do this:
- Put the form into design mode.
- Open the Data Model dialog box by selecting Form | Data Model.
- Right-click on the table whose behavior you want to modify and remove the check mark next to "Auto-Append".
Q: WHY CAN'T I CHANGE THE SORT ORDER OF MY DETAIL TABLE THROUGH THE FILTER DIALOG BOX? THE ORDER BY
CHECK BOX IS ALWAYS GRAYED OUT WHEN I CHOOSE MY DETAIL TABLE.
A: The sort order of a detail table is determined by the link. The only way to change the sort order of the detail table is to re-link it to the
master table in a one-to-one relationship using a different index. This process can be automated by ObjectPAL.
FORM DESIGN QUESTIONS THAT APPLY TO ALL VERSIONS
Q: HOW DO I SELECT MULTIPLE OBJECTS IN A FORM?
A: Select additional objects by holding down the Shift key and simultaneously clicking on the other object. Choose Edit | Select All to select
all of the objects within the same container at once. To unselect objects, press the Esc key.
Q: HOW DO I ADD THE DATE, PAGE NUMBER, TIME, OR NUMBER OF PAGES TO MY FORM?
A: Use the Field Tool to create an undefined field on the form.
Right-click the field, choose Define Field to access the Define Field Object dialog box.
Use the drop-down arrow in the Special Field box to select your preferred field option.
Q: HOW DO I CHANGE THE FONT OR PROPERTIES OF THE WHOLE FORM WITHOUT CLICKING ON EACH INDIVIDUAL
FIELD?
A: Click the title bar of the form to select the form. Press Shift-F6 to display the Objects in Form dialog box (or menu), and change the
desired properties.
Q: HOW CAN I CHANGE THE TAB ORDER OF THE FIELDS IN MY FORM?
A: The technique varies depending on which Paradox version you are using.
In Paradox 7 for Windows 95 & Windows NT:
- Right-click on the field and choose Properties.
- Click on the Run Time tab.
- Check Choose Next Tab Stop.
- Select your next tab stop.
Another way to control the tab order is to group fields. When a field is selected in a group, Paradox will tab through each field in a group
before moving to a field outside of the group.
Q: IS IT POSSIBLE TO LINK A dBASE TABLE AND A PARADOX TABLE IN THE DATA MODEL?
A: Yes. The only requirement is that if the dBASE table is a detail table, you need to match the index entirely. If there is a relationship
between the tables and the detail table has a maintained index, then you can link the tables.
Q: I HAVE A FORM WITH A ONE-TO-MANY RELATIONSHIP AND I AM ON A NETWORK. I HAVE FOUND THAT TWO
Q: I HAVE A FORM WITH A ONE-TO-MANY RELATIONSHIP AND I AM ON A NETWORK. I HAVE FOUND THAT TWO
USERS CANNOT EDIT OR CREATE DETAIL RECORDS FOR THE SAME MASTER RECORD AT THE SAME TIME. WHY? IS THERE A
WORK AROUND?
A: The reason this happens is that whenever you edit a detail record, it places a record lock on the master record. When the second user
comes along, they can't place a record lock on the master record because the first user already has it locked. This is designed to be this way.
Q: IS IT POSSIBLE TO UNDELIVER A FORM?
A: No. By delivering the form, Paradox is actually creating another, compiled version of the file. You cannot edit this compiled version
because of the way in which the code is stored. The code's actually being compiled into P-Code and is faster than code that is not compiled to
P-Code. It's a good idea to always save a copy of the undelivered version of your form for later use.
Q: HOW DO I CALCULATE THE NUMBER OF DAYS BETWEEN TWO DATES? WHENEVER I TYPE IN THIS FORMULA
DATE1-DATE2 PARADOX RETURNS A DATE.
A: This is the default behavior for Paradox. In order to get the number of days between two dates you will need to "cast" the result as a
number. For example: Number(date1-date2).
Q: HOW DO I GET A BIGGER CALCULATED FIELD EDITOR WINDOW?
A: If your calculated field is on a form, you can use the following technique.
- Use the Field Tool and create a field on your form.
- With the field selected, right-click the field and choose Define Field.
- Check the Calculated check box and put something in the Calculated text box. Choose OK. (You must put a valid expression, for example 0, in
the Calculated text box for this technique to work).
- Right-click the field.
- If you are using Paradox 7 for Windows 95 & Windows NT, choose Object Explorer, click Methods, and click New Methods.
- In the New Method Name text box, type calcField. Choose OK.
This will open an editor window with the calculated expression that you typed into the Calculated text box. This technique strips out the
method..endMethod statements from the editor window because calculated fields cannot contain these statements.
At this point you can modify the calculated expression as needed.
If, after closing the editor window, you need to modify the calculated expression, follows steps 4-6 above.
Q: IN A FORM, ON A MEMO FIELD, WITH EDIT AND FIELD VIEW SELECTED, WHY DOES THE CURSOR ADVANCE TO THE
NEXT FIELD WHEN I PRESS ENTER KEY INSTEAD OF PUTTING A CARRIAGE RETURN IN THE MEMO FIELD?
A: To use the Tab key or Enter key on a memo field in a form, you must be in Memo View. This is done by pressing Shift+F2.
Q: IN THE DATA MODEL OF A FORM OR A REPORT, WHAT DOES THE ASTERISK (*) AFTER THE FILE EXTENSION OF A
TABLE OR QUERY MEAN?
A: If there are dependent objects of a table or query on a form or report, the table or query will have an asterisk(*) after the file extension. To
see this, create a form linking the Customer and Orders sample tables in the data model. Accept the default Design Layout. In design mode open
the data model. Notice the asterisk (*) after the file (such as, CUSTOMER.DB *). This means the form has objects that depend on the table. If you
take this table out the data model, that object will be undefined when you re-enter form.
Q: HOW CAN I DISABLE THE NEW FORM DIALOG BOX THAT COMES UP WHEN I CREATE A NEW FORM (THE ONE THAT
HAS BLANK, FORM EXPERT, AND DATA MODEL / LAYOUT DIAGRAM)?
A:In Paradox 7 for Windows 95 & Windows NT:
- Choose Edit | Preferences.
- Choose the Form/Report's tab.
- Under the New forms/reports section you can choose whatever you desire.
Q: IS IT POSSIBLE TO RUN A .FSL FORM I HAVE CREATED IN PARADOX 7 IN PARADOX 5?
A: Yes, if you don't use any methods or objects that are not supported in 5.0.
Q: I WOULD LIKE MY UNDEFINED FIELD ON MY FORM TO BE FORMATTED IN UPPERCASE. HOW CAN I ACCOMPLISH
THIS TASK?
A: If you are using Paradox 5.0 or later, you can add Picture statements to undefined fields. In Paradox 7 for Windows 95 & Windows
NT:
- Right-click on the field where you want to apply the format.
- Choose Properties on the pop up menu.
- Choose the Picture Tab then click on the Add Custom Picture button.
- Place this picture statement in the Picture text field: *!
- Click on the OK button.
- Click on the Apply button.
OBJECTPAL FORMS QUESTIONS THAT APPLY TO ALL VERSIONS
Q: HOW DO I FIND OUT HOW MUCH CODE I HAVE IN MY SYMBOL TABLE?
A: You can use the compileInformation() procedure to determine the code size and symbol table size. This procedure lists information about
the form most recently compiled. This procedure is useful for analyzing large forms, libraries, scripts, and reports. It writes the data to the
DynArray information that you declare and pass as an argument. The structure of the DynArray is:
| CodeSize | The compiled size of the code segment (in bytes). The maximum allowed size is 64KB. For Paradox 7 32-Bit it is
unlimited. |
| CompileTime | Compile time (in milliseconds). |
| DataSize | The compiled size of the data segment (in bytes). The maximum allowed size is 64KB. For Paradox 7 32-Bit it is
unlimited. |
| MethodCount | The number of methods that have code and/or comments. |
| SourceSize | The size of the uncompiled source code(in bytes). |
| SymbolTableSize | The compiled size of the symbol table (in bytes). The maximum allowed size is 64KB. For Paradox 7 32-Bit it
is unlimited. |
Below is an example of how to use this procedure.
method pushButton(var eventInfo Event)
var
dynCompileInfo Dynarray[]AnyType
endVar
compileInformation(dynCompileInfo)
dynCompileInfo.view()
endmethod
Q: HOW CAN I HAVE A MEMO FIELD ENTER MEMO VIEW WHEN I MOVE TO IT?
A: This requires ObjectPAL.
Put the following code in the arrive method of a standard or formatted memo field:
method arrive (var eventInfo MoveEvent)
doDefault
self.action(EditEnterMemoView)
endMethod
The following code can be used in a pushButton method to move to a memo field and put the memo field into memo view:
Q: I AM TRYING TO USE A CALCULATED FIELD EXPRESSION TO DETERMINE WHETHER A LOGICAL FIELD IS TRUE.
WHEN I USE THE SYNTAX, IIF([MYTABLE.FIELDNAME]="TRUE",Y,N) I AM NOT GETTING THE CORRECT BEHAVIOR.
A: In the IIF expression, the word TRUE should not be in quotes. Since FIELDNAME is a Logical field, the expression should be:
IIF([MYTABLE.FIELDNAME]=TRUE,Y,N)
Q: I AM MISSING A LOT OF OBJECTPAL EVENT METHODS. WHEN I OPEN THE OBJECT EXPLORER (OR METHOD
INSPECTOR) I ONLY SEE ABOUT 8 TO 10 METHODS.
A: You have your ObjectPAL level set to the Beginner level. You'll need to set it to the Advanced level.
In Paradox 7 for Windows 95 & Windows NT:
- Choose Edit | Developer Preferences.
- Set the ObjectPAL level section, select Advanced.
Q: WHENEVER I RUN OR DESIGN THE FORM THE DEBUGGER WINDOW OPENS. I AM NOT ISSUING ANY COMMANDS TO
OPEN IT. IT JUST OPENS BY ITSELF.
WHAT IS CAUSING THIS BEHAVIOR?
A: You probably have checked both of the options under the Debug environment section. To remove the Debugger window do the
following:
In Paradox 7 for Windows 95 & Windows NT:
- Choose Edit | Developer Preferences.
- Uncheck the Open in Design and Open in Run options under the Debug Environment section of the General tab.
QUESTIONS THAT APPLY ONLY TO PARADOX 7 (16-BIT AND 32-BIT)
Q: HOW DO I TURN OFF THE EXPERTS THAT APPEAR WHEN I CREATE A NEW OBJECT ON THE FORM?
A: In Paradox 7 for Windows 95 & Windows NT:
- Choose Edit | Preferences.
- Choose the Experts tab.
- Uncheck the option, Run Experts When Creating Objects On Documents.
QUESTIONS THAT APPLY ONLY TO 32-BIT PARADOX
Q: I JUST INSTALLED PARADOX 7 FOR WINDOWS 95 & WINDOWS NT ON MY MACHINE AND EVERY TIME I TRY TO
CREATE A NEW FORM, PARADOX PRODUCES A GENERAL PROTECTION VIOLATION. HOW DO I RESOLVE THIS PROBLEM?
A: This problem can be caused by a corrupt printer driver. The solution is to delete all the printer drivers you have and reinstall them.