Application command buttons

  1. Click the Application button on the Toolbox toolbar.
  2. Position the mouse pointer where you want the Application button to appear and either click the left mouse button or drag the pointer to a specific size. The Specify Application Button Details dialog is displayed.
  3. Specify this information:
    Application Name
    Enter the name of your application. This name appears as the caption on your application button. Use the browse button to locate your application.
    Start Directory
    Use the browse button to locate or change the start directory where the specified application is located. Enter the.exe name only, because other users may have the executable stored in differing locations.
    Optional Parameters
    Enter the optional parameters that you want to be passed to the external application.
  4. To pass current record information to the external application, you must enter the subset and item reference details for the particular data items you want to pass. Use the syntax [ss,rr], where ss is the data item subset and rr is the item reference.
  5. Click OK.

Example

Using the Addresses form, you can set up the application button with the following parameters:

  • Application Name: excel.exe
  • Start Directory: c:\mydocuments
  • Optional Parameters: Address[0,10].xls

The data item Address Code has the subset 0 and item reference 10. At form runtime, if SOUTH is the Address Code for the current record, the file AddressSOUTH.xls is opened in Microsoft Excel. However, you must ensure that a Microsoft Excel file with the same name already exists in the specified Start Directory.

It is possible to identify one or more data items by using multiple sets of [ ] square brackets, such as Address[0,10][0,20].xls.

Tematy pokrewne