Opening the Default Form or Browse

Description

You can open the default browse or form for a table or set in Xbasic with FORM.VIEW():

Form.view("Default Form for tablename at full_tablename.dbf ")

Or a browse with BROWSE.VIEW():

Browse.view("Default Browse for tablename at full_tablename.dbf ")

Where tablename is the name of the table or set, and full_tablename is the name of the table or set, fully qualified with the drive and path. (In the case of a Set, you would use the .SET extension, not the .dbf extension). In addition, you many use the A5_OPEN_DEFAULT_BROWSE() and A5_OPEN_DEFAULT_FORM() functions.

Examples 

Form.View("Default Form for [email protected]:\a5v4\invoice\customer.dbf")
:DefaultForm_customer.activate()
Browse.View("Default Browse for [email protected]:\a5v4\invoice\customer.dbf")
:DefaultBrowse_customer.activate()

Opening the default browse for form is useful if you have an Xbasic program that creates a new table. After the new table has been created, you may want to inspect the table in browse or form view and you want the Xbasic program to automatically open the form or browse. You cannot have a pre-existing named form or browse to refer to with the FORM.VIEW() method because the table is a new table.

See Also