MrT Guest
|
Posted: Fri May 26, 2006 1:14 am Post subject: Master Detail Problem |
|
|
Hi:
I have a Master/Detail relation using the master datasource to
synchronize the detail.
The master can be one of two tables. In Master 1 I have a key
field Id and and in Master 2 I use an Id field + "-" + subID field
I open the Form with the detail data set and pass parameters dYear and
MemberID (either the single value or the composite value depending on
Master). Many remaining fields in Detail correspond with fields in both
masters. I had assumed that Field NAMEFIRST in detail would be
automatically supplied with the value from Field NAMEFIRST in the master
via the NAMEFIRST :NAMEFIRST relationship through the data source even
though I am supplying the key field values separately. I have never
tried this before and perhaps is does not work this way.
Manually inserting data for testing through IBConsole allows selection
of correct record from either of the two masters.
select * from CRINVOICE
where YEARINV = :dYear AND ID = :MemberId
When I insert into the detail:
insert into CRINVOICE
(YEARINV, ID, SEQUENCE, ROA_ID, NAMEFIRST, MI, NAMELAST, POBOX,
NUMBER,
STREET, CITY, STATE, ZIP, DPBC_2, DBPC_CHK, INVOICE_NUM,
INVOICE_DATE,
INVOICE_AMT, DUE_DATE, AMOUNT_PAID, DATE_PAID, CHKCSH_PAY,
NUMBER_PAY,
BALANCE_OWING, CURRENT_DUE, AMT00TO30_DUE, AMT31TO60_DUE,
AMT61TO90_DUE,
AMTOVER90_DUE, INVOICE_DETAIL)
values
(:dYEAR, :MemberID, :SEQUENCE, :ROA_ID, :NAMEFIRST, :MI, :NAMELAST,
:POBOX,
:NUMBER, :STREET, :CITY, :STATE, :ZIP, :DPBC_2, :DBPC_CHK,
:INVOICE_NUM,
:INVOICE_DATE, :INVOICE_AMT, :DUE_DATE, :AMOUNT_PAID, :DATE_PAID,
:CHKCSH_PAY,
:NUMBER_PAY, :BALANCE_OWING, :CURRENT_DUE, :AMT00TO30_DUE,
:AMT31TO60_DUE,
:AMT61TO90_DUE, :AMTOVER90_DUE, :INVOICE_DETAIL) |
|