Subform displays previous child records

chrislee

New member
Local time
Today, 17:22
Joined
Aug 19, 2003
Messages
8
I'm creating a simple database to handle quotes.

My parent table is tblQuote: (fieldname /datatype)
- number (pk) /number
- createdate /datetime
- owner /txt
- title /txt
- contactname /txt
- customerid /number
- revision /number
- lastupdatedate /datetime
- status /number

Child table is tblQuoteItem:
-ID (pk) /autonumber
-quoteID (pk) /number
-manufacturer /txt
productname /txt
productcode /txt
costprice /currency
supplier /number
retailprice /currency
quantity /number
VATRate /number

relationship is set as one to many (one quote has many quoteitems).

I have created 2 basic forms for each table, frmQuote and frmQuoteItem, and added frmQuoteItem as a subform on frmQuote. On the subform object, Link Child Fields = "QuoteID" and Link Master Fields = "Number".

I can add quote records and can add quoteitem records via the subform without any problems. The child records show correctly with their respective parents fine.

The problem: when I click the new record button (on builtin navigation buttons) or pagedown to a blank parent record, the child records that belong to the first parent record are displayed.[/COLOR]
Can anyone advise what am I doing wrong?

TIA,

Chris.
:confused: :confused: :confused:
 
Look at the data in the underlying tables to make sure that the data isn't actually duplicated. Then check the master/child links again. I have known them to change.
 
Thanks for your reply Pat.

I've managed to fix this now. The issue seemed to be my naming of the key fields, presumably the use of 'number' as a field name. I changed them to QuoteNumber on both tables and now everything works as it should.

Chris. :) :)
 

Users who are viewing this thread

Back
Top Bottom