Commands

VPM Enterprise automatically creates the menu command when you select a menu option in the Object Builder to build a form, program, report, query or label. The formats of the menu commands VPM Enterprise creates are described below. Knowing the formats of the commands VPM Enterprise uses to call objects will help you if you need to modify a menu command or need to call an application object from program code.

Forms

VPM Enterprise creates the following menu command for forms:

DO FORM FormName

“FormName” is the name you enter when you create the form from an Object Builder menu option.

You should use this command format to call a form from code you write.

Tip: If you need to call a form whose name contains a space, be sure to put quotes around “FormName”. The command line should look like this:

DO FORM “FormName”

Programs

VPM Enterprise creates the following menu command for programs:

DO ProgramName

“ProgramName” is the name you enter when you create a program from an Object Builder menu option.

Queries

VPM Enterprise creates the following menu command for queries:

MODIFY QUERY QueryName

“QueryName” is the name you enter when you create a query from an Object Builder menu option.

Reports

VPM Enterprise creates the following menu command for reports:

_SCREEN.oApp.RunReportSetupForm(‘ReportName,report’)

This command displays the report setup form and passes it the name of the report to run.

“ReportName” is the name you enter when you create a report from an Object Builder menu option.

The word “report” tells the report setup program that it’s the front-end for a Visual FoxPro report, not a Visual FoxPro label.

You should use this command format to run a report from code you write if you want to use the report setup form as a front-end for the report.

Labels

VPM Enterprise creates the following menu command for labels:

_SCREEN.oApp.RunReportSetupForm(‘LabelName,label’)

This command displays the report setup form and passes it the name of the label to run.

“LabelName” is the name you enter when you create a label from an Object Builder menu option.

The word “label” tells the report setup form that it’s the front-end for a Visual FoxPro label, not a Visual FoxPro report.

You should use this command format to run a label from code you write if you want to use the report setup form as a front-end for the label.

More:

Menu Option Comment