Form Functions and Methods
A list of the form functions and methods provided in Alpha Anywhere.
Alpha Anywhere provides the following Form functions.
Returns a CR-LF delimited list of all saved forms.
Returns the filename of the file contains the named form.
Opens the named layout in the appropriate editor.
Opens the default form for a table or set.
Closes a form, runs Xbasic code, then restores the form.
Returns the current setting of the Form > Allow Edits, or Browse > Allow Edits menu command.
Closes a form if it is open.
Deletes the named Form.
Renames or copies the named Form.
Displays a form as it would appear when printed.
Creates the selected forms and then displays the Print dialog box.
Alpha Anywhere provides the following Form methods based on the default FORM object.
Some Methods, shown in the second half of the methods list, require a prefix. Prefix these methods with either:
the name of the form
topparent, when working within the form
the pointer returned by the FORM.LOAD(), FORM.VIEW(), or FORM.VIEWQUERIED() methods.The following script examples, attached to a button on the Customer Information form, switch the form to browse view
Using an alias is desirable when working within the form.
Using the form name can cause problems, because it can change.
Using a pointer is necessary when working outside the form.
dim frm as P frm = form.view("Customer Information") frm.browse_view()
Prints Layout_Name to file in the .PDF format.
Creates and displays a new form for a table or set.
Opens Form_Name as a dialog box.
Loads Form_Name into memory and returns the object pointer.
Displays the form and the selected records in the Print Preview dialog.
Obsolete, see PRINT_FORM(). PRINT()creates the selected forms and then displays the Print dialog box.
Prints Layout_Name to file in the specified format. If no format is specified, the .PDF format is used.
Emails a layout as an attached file of type Format.
Opens Form_Name and returns the object pointer to the form window.
Opens Form_Name and returns the object pointer to the form window.
Opens a form and displays the current record in an embedded browse.
- Methods Requiring Prefixes
Sets focus to the object.
Returns the name of the control (or column in the case of a Browse) with focus.
Returns the address of the deepest control that has focus.
Returns the name of the control which previously had focus.
Returns the name of previously active object, drilling down into container objects.
Sets the Allow Changes flag. When the flag is .T., data can be edited.
Returns .T. (TRUE) if the form allows editing.
Sets the base filter and order expressions for a form.
Toggles a form window into a browse window.
Activates a button and runs the buttons OnPush event.
Cancels any changes made to the current record before the records is saved. Works for forms and browses.
Puts a form into change mode, just as if the user had done so by beginning to type into any field.
Returns an object pointer to the Nth child of the object, or the child object called Object_Name.
Returns a CR-LF separated list of all the child objects on the form, in tab order.
Returns the number of objects that a container object contains. Returns zero if the object is not a container.
Returns the class (i.e., type) of the object.
Closes the form or browse window.
Saves the current records.
Copies values from the previous record into the current record.
Copies values from the corresponding field in the previous record into the current field.
Returns the position of the cursor on the form.
Sets the position of the cursor on the form.
Returns the mode of the form.
Deletes the current record.
Dials the phone number in the control that currently has focus.
Returns the name of the dictionary file that contains the form.
Makes a form unable to receive focus. May also gray the object. Works with fields, buttons, check boxes, etc.
Moves the focus down as if the user had pressed the Down key. Works with forms.
Creates a new record that is a duplicate of the current record. Moves focus to the new record.
Makes an object able to receive focus.
Interprets a string as Xbasic code.
Moves to the first record in the current query.
Moves to the last record in the current query.
Moves to the next record in the current query.
Moves to the previous record in the current query.
Returns the current filter expression for the form.
Does a Find by Key for value. If value is not specified, the built-in Find dialog is displayed.
Displays the Find and Replace dialog box.
Puts the form into Find by Form mode.
Clears entries from the Find by Form mode form.
Cancels the Find by Form mode.
Repeats the Find by Form, finding the next record.
Repeats the Find by Form, finding the previous record.
Runs the Find by Form.
A high level approach to displaying the Find by Key dialog box that allows you to customize its appearance and preset its filter.
Returns a pointer to the container of the object that has focus.
Returns .T. (TRUE) if the form supports the specified method.
Hides an object.
Returns the name of the form's icon.
Returns the name of the current primary index or query.
Returns a pointer to the current primary index or query.
Selects an index or query list as the primary index.
Sets the primary index for the form.
Displays the Primary Index or Query dialog box.
Returns .T. if the object is the last object on the form, as specified in the forms prompt order.
Returns .T. (TRUE) if the form is visible.
Returns the kind of object represented by a form.
Returns the name of the last button pressed when a form is opened as a dialog.
Moves the focus to the left as if the user had pressed the Left key.
Displays the Locate dialog box.
Finds the next record with a field value matching value. If field is not specified, all fields are searched. Otherwise, only the specified field is searched.
Finds the previous record with a field value matching value. If field is not specified, all fields are searched. Otherwise, only the specified field is searched.
Marks the current record.
Maximizes the form window.
Displays the named menu.
Displays or removes a checkmark next to a menu entry.
Enables or disables (grays) a menu entry.
Enables and removes any checkmarks from a menu entry.
Minimizes the form or browse window.
Returns the current mode of the form. Possible modes are: VIEW, CHANGE, ENTER, QUERY and FIND.
Displays the Multi-Select Records dialog box.
Returns the object name.
Displays the Goto which field? dialog box.
Enters a new record into a form or a browse.
Moves the focus to the next control in the tab order as if the user had pressed the Tab key. Works with forms and browses.
Returns the current order expression for the form.
Sets the name of the file to be printed. It returns the name, if any, of the file currently set to be printed.
Moves the focus to the previous control in the tab order as if the user had pressed the Shift-Tab key.
Sets the printer configuration, and optionally, saves the current configuration before overwriting it.
Displays the Query by Expression dialog.
Switches a form to Query by Form mode.
Opens the Query by Table window.
Clears entries from the Query by Form mode form.
Exits from Query by Form mode.
Displays the Query Genie dialog box.
Switches a form to the Query by Form mode specified by mode.
Runs the query specified in the Query by Form window.
Applies a query to the current form.
Exports the currently selected records to Excel.
Performs the same action as the Quick Filter command.
Opposite of the .QUICK_SEARCH() methods. Finds all records that do NOT match the value in the current control.
Performs the same action as the Quick Sort command. Works with forms and browses.
Returns a count of the matching records, as if you had clicked the Quick Filter icon.
Sorts the table or set on the indicated field and then displays it in the current form.
Displays the Custom Sort dialog box.
Filters the records in a form based on the value of a field.
Displays the multi-field Quick Filter dialog.
Displays the specified record number.
Returns the number of records displayed by the form.
Returns the reference expression to reconstruct a reference to the object.
Forces a control to re-fetch data from its data source, and then to repaint itself. Works with all controls.
Refreshes all the fields on the form.
Reloads the form.
Restores a minimized or maximized window to normal size. Works with form and browse windows.
Re-fetches all data for the form and repaints the form. Works with forms and browses.
Moves the focus to the right as if the user had pressed the Right key.
Displays the right-click for the selected object.
Runs the saved Query operation called Query_Name. This method is equivalent to the user selecting the Query, Run saved query menu option.
Selects text in the current field from Start_Position for Length characters.
Emails the form.
Returns the session handle associated with the object.
Indicates that the form layout has been changed.
Shows an object that may previously have been hidden using the .HIDE() method. Works with fields, buttons, check boxes, text, lines and most other objects on forms.
Turns off the current query and shows all records in the table (subject to any base filter that may have been specified in the form or browses Filter/Order properties).
Opens the memo editor for a memo field.
Returns the size of the window in inches (width x height).
Displays the Select Filter dialog box.
Displays the Spellchecker dialog box.
Replaces the current form with a different form.
Returns the tab number of the tab page that has focus.
Activates the specified tab page on a tab control on a form.
Returns a pointer to the primary table that the form is based on.
Switches the form to browse mode.
Loads and displays the selected toolbar.
Enables or disables the specified item on the control bar.
Returns the type of data bound to an object.
Un-marks the current record.
Moves the focus up as if the user had pressed the Up key.
Returns a pointer to a dot variable that contains the values of the selected variables.
Sets the location of the form on the screen.
Sets the stacking position of a form.