Creating a Select-list (SELECT)

Assume that the user has an ACCOUNTS file that contains, among others, attributes for the following data: customer ID, order number, date of order, status, balance due, and amount paid, and wants to run an mvBASIC program that generates invoices for all unpaid items.

One of the first things the program must do is select only those items whose balances are still unpaid. The STATUS attribute will contain PD if payment has been received; if the account has not been paid, STATUS will contain no value. A SELECT statement such as this might be used:

SELECT ACCOUNTS WITH STATUS = " "

The two sets of quotation marks with nothing between them specify a null value in the STATUS attribute. Once the items have been selected, a forms generation statement may be used to print the invoices. Since the select-list of unpaid accounts is active, no further selection processing is necessary. For more information, see the section titled Generating Forms wint INFO/ACCESS.

See Also

Creating Select-lists

Selecting Items that Contain a String (FIND)

Listing Items Not Included in a Select-list (NSELECT)

Creating a Select-list from Data (QSELECT)

Selecting a Specified Number of Items (SAMPLE)