Coordinating the Form and the Visual Query
In order for Vision to generate the correct code and form for a frame, it is important that the form for a frame correspond to its visual query. Therefore, Vision places these restrictions on the changes you can make to a form:
• You cannot remove a field for a column in a table used in the visual query. You can, however, make the field invisible.
To remove a field from the form, you must go back to the Visual Query Editor and change the display status of the column (that is, change the indicator in the Display on Form column to "n").
• You cannot change the data type or internal name of a field for a column in a table used in the visual query.
The internal name is the name by which the column is stored in the database; this is the name shown in the visual query display.
• You must not create a new field with the same name as a column in a table used in the visual query. The forms editor lets you create the field, but an error occurs when you run the frame.
(Be aware that this situation occurs if you replace the form with a duplicate form that you have created with VIFRED.)
• If you delete a field with an escape code activation, Vision deletes the escape code as well.
Use a Form with Multiple Frames
You can use the same form with frames that have identical visual queries; for example, a Browse and an Update frame. In this way, you need to edit the form only once.
Note: You cannot share a form between two frames when one of the frames calls the other.
To specify a form name other than the default for a frame
1. Use the MoreInfo operation of the Application Flow Diagram Editor to enter the form name.
2. Use the Compile menu item of the Application Flow Diagram Editor to regenerate the code for the frame.
This ensures that the source file refers to the correct form.
If you change the visual query for two Append, Browse, or Update frames that share a form, Vision updates the form for one frame—by removing a field, for example—in such a way that the form is incompatible with the other frame. This causes compile errors in the second frame.
This is not a problem if one of the frames is of a type for which Vision does not generate the code.
Last modified date: 08/28/2024