home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware 1 2 the Maxx
/
sw_1.zip
/
sw_1
/
TEXT
/
PDX_ALL.ZIP
/
TI502.ASC
< prev
next >
Wrap
Text File
|
1991-09-11
|
4KB
|
133 lines
PRODUCT : PARADOX NUMBER : 502
VERSION : PARADOX 1 AND 2 ONLY
OS : DOS
DATE : September 11, 1991 PAGE : 1/2
TITLE : ONE-TO-MANY RELATIONSHIP IN A MULTI-ENTRY FORM
It is possible to have a One-to-Many relationship in a Multi-
Entry operation without having to duplicate information. Creating
multiple fields for this presents many problems of its own, and
is generally not the preferred method. However, you can use the
following information to create a One-to-Many relationship in a
Multi-Entry Form.
Set up a TRANSACTION file (the one that will contain the tasks)
so that a single record contains a single task. Create a JOB
file, which must be keyed. Set up your Multi-Entry Form as
discussed on pages 148 through 152 of the User's Guide.
The trick to this method is the duplication of the parent
information (your JOB information) automatically. If you enter
duplicate records that will be Multi-Entered into a keyed table,
only one of the duplicates will be posted into the keyed file,
the rest bounce off. Of course, all of the information going
into the TRANSACTION file will arrive properly.
There are two methods to duplicating the information in the
parent part of the Multi-Entry screen:
1. If you are doing your Multi-Entry in a script, you should
use WAIT RECORD during entry. You need to have an UNTIL
key defined to duplicate the parent information in a new
record and another defined to advance to the next
completely new record. A third key should be defined as
the quit entering key. For example, the following can be
used for editing keystrokes:
o [F3] for the duplicate parent key.
o [F4] as the entirely new record key.
o [F2] for ending edit.
On [F3] use CopyToArray to grab the current record, DOWN
to go to a new blank record, then use a FOR..NEXT loop to
load the fields of the parent record from the array. Then,
return to your WAIT RECORD. On a [F4] simply use DOWN and
on [F2] Do_It.
PRODUCT : PARADOX NUMBER : 502
VERSION : PARADOX 1 AND 2 ONLY
OS : DOS
DATE : September 11, 1991 PAGE : 2/2
TITLE : ONE-TO-MANY RELATIONSHIP IN A MULTI-ENTRY FORM
2. If you are doing Multi-Entry interactively, without a
script, there is an easy way to do the duplication.
Simply follow these steps:
a. While you are in the Multi-Entry mode, type in a
complete record.
b. Move to a blank record.
c. Press [ALT-F3] to begin an Instant Script Record.
d. Move to the first field on your form that needs to
be duplicated.
e. Press [CTRL-D] (the ditto key). This will copy the
data from the preceding record into the current
record.
f. Move to the next record and press [CTRL-D].
Continue this until all the fields from the "parent" table
have been duplicated. Press [ALT-F3] again to end the
Instant Script Record. You have now created a "Script"
that will copy the information for you.