FORMOPEN

This function will open another form.

FORMOPEN(Formname // SQL // Mode // Server // LinkField // SubLinkField)

PARAMETERS

Formname

The name of the existing abcDB™ form which you wish to open

SQL

The sql statement you wish to use to populate the form.  NOTE:  If no SQL is entered, the default SQL statement will be used (ie. The sql statement that is found in the form’s SQL property)

Mode

The data mode that the form will be opened with

0 = Add Data
1 = Edit Data

2 = Read Only

Server

The data server used to send the sql statement to.  Unless the server is a 'remote' server used by abcDB™ Wireless, you must enter the default value of ---.

LinkField

The field (or TAG) on the current form that contains the key value used to ensure referential integrity on this newly opened form.

Sublink Field

The field on formname that will always be populated with the linkfield value in newly added records.

Example:
To open a form named 'AA' populated with all records where field A’s value = ‘APPLE’:

FORMOPEN("aa"//"select * from a where a ='APPLE’"//1//"---"////)

If the current form contained a textbox with a TAG name of FRUIT, you could open the new form based on that value like this:

FORMOPEN("aa"//"select * from a where a ='” ~FRUIT~ “’"//1//"---"////)