[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
+---------------------------------+
| BROWSE |
+---------------------------------+
BROWSE
[FIELDS <field list>]
[FOR <expL1>]
[FORMAT]
[FREEZE <field>]
[KEY <expr1> [, <expr2>]]
[LAST]
[LEDIT] [REDIT]
[LOCK <expN1>]
[LPARTITION]
[NOAPPEND]
[NOCLEAR]
[NODELETE]
[NOEDIT | NOMODIFY]
[NOLGRID] [NORGRID]
[NOLINK]
[NOMENU]
[NOOPTIMIZE]
[NOREFRESH]
[NORMAL]
[NOWAIT]
[PARTITION <expN2>]
[PREFERENCE <expC1>]
[REST]
[SAVE]
[TIMEOUT <expN3>]
[TITLE <expC2>]
[VALID [F:] <expL2>
[ERROR <expC3>]]
[WHEN <expL3>]
[WIDTH <expN4>]
[[WINDOW <window name1>]
[IN [WINDOW] <window name2>
| IN SCREEN]]
[COLOR SCHEME <expN5>
| COLOR <color pair list>]
-----------------------------------
Browses a database.
-----------------------------------
BROWSE is one of the most useful commands available in FoxPro. Use the
BROWSE command to open a window and display records from a database
file. You can then easily edit and append records. You can have a
Browse window open for each work area if you have sufficient memory.
For further information on the use of the Browse window, refer to the
FoxPro Interface Guide.
Navigating in a Browse Window
-----------------------------
You can move from record to record with the Up and Down arrow keys, or
move forward or backward through a group of records with Page Up or Page
Down. To move to the next or previous field, press Tab or Shift+Tab.
Saving Your Changes
-------------------
You can save any changes you make to your data and exit BROWSE by
pressing CTRL+W or CTRL+End, or by clicking on the close box. If you
press CTRL+Q or Esc, you can exit BROWSE without saving changes you made
to the current field. You can edit memo fields in the Browse window.
To edit a memo field in Browse, place the cursor in the memo field and
press CTRL+PgDn. If you have a mouse you can double-click on the memo
field to open it for editing. To exit the memo field and save your
changes, press CTRL+W or click on the close box. To exit the memo field
without saving your changes press Esc.
SET SKIP Support
----------------
The SET SKIP command lets you establish a one-to-many relationship
between two databases. For each record in the parent database there can
be multiple related records in the child database. If you create a
one-to-many relationship, you can use BROWSE to view records from both
the parent and child databases. For each record from the parent
database that appears in the Browse window, all related records (if any)
from the child database will appear. The parent record will appear once
along with the first matching record from the child database.
Subsequent matching records (if any) will appear in the rows following
the parent and first matching child record. Shaded blocks will appear
in any column containing information from the parent database beyond the
first matching record. You can move between each of the parent records
in the Browse window by pressing CTRL+down arrow to move to the next
parent record, or CTRL+up arrow to move to the previous parent record.
For additional information on creating one-to-many relationships, see
the SET SKIP command in this help facility.
In the following program example, a one-to-many relationship is created
with the SET SKIP command. A parent INVOICE database has fields
containing the invoice number and information about the customer who
placed the order. There is a single record in the parent database for
each invoice created. Another database (LINEITMS, the child) also
contains a field with invoice numbers. The remaining child fields
contain information about each item in the invoice. The child LINEITMS
database contains multiple records (the invoice items) for each record
in the parent database. A browse window is then opened with records from
both the parent and child databases.
Example
CLEAR
SELECT 1 && Parent work area
USE invoice && Parent database
SELECT 2 && Child work area
USE lineitms && Child database
INDEX ON invoice TAG invoicecdx && Index relationship utilizes
SELECT invoice &&Back to parent work area
SET RELATION TO invoice IN lineitms && Establish relationship
SET SKIP TO lineitms && Make relationship one-to-many
BROWSE FIELDS invoice, lineitms.item, lineitms.descript
COL() and ROW() Support
-----------------------
The COL() and ROW() functions can be used to return the current screen
row and column position of the cursor in a Browse window. If a Browse
window is opened in the screen, the cursor position is returned relative
to the screen, not the Browse window itself. If a Browse window is
opened in a window, COL() and ROW() return the cursor position relative
to the window. The BROWSE command supports numerous options. A list of
the available options and a brief description of each follows.
Clauses
-------
FIELDS
Displays only fields in <field list>. <field list> can specify any
combination of database or calculated fields. Format of <field list>
is:
<field1> [:R] [:<column width>]
[:V = <expL1> [:F] [:E = <expC1>]]
[:P = <expC2>]
[:B = <expr1>, <expr2> [:F]]
[:H = <expC3>]
[:W = <expL2>]
[, <field2> [:R] ... ]
Calculated Fields
Format of statement to create calculated field:
<calculated field name> = <expr>
Options for special handling of named BROWSE fields. These options are
preceded by either : or /.
Option Handling
--------------------
R Read-only
<col width> Size of field
V Data validation - not executed for memo fields
F How comparison validation made - not executed for memo fields
E Error message
P PICTURE for field
B Range of numbers
H Field heading
W Allows/Prohibits field entry - not executed for memo fields
FOR <expL1>
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson