Master-Detail records

Master-Detail records

Post by George Kua » Tue, 21 Oct 2003 09:44:25


After selecting a master record, how would I go about capturing field values
from a detail table in code?
 
 
 

Master-Detail records

Post by George Kua » Thu, 23 Oct 2003 08:24:00

I have several detail records. How would I go about getting values for each
detail record?



values

 
 
 

Master-Detail records

Post by George Kua » Mon, 20 Mar 2006 10:08:43

I'm using D6 with MSAccess2000.

I have a master-detail relationship. I need some code in my Master
AfterScrollEvent to determine if there are no detail records linked to the
current master record. Can someone show me how to do this?

I've been unsuccessful.
 
 
 

Master-Detail records

Post by Bill Tod » Mon, 20 Mar 2006 22:09:06


Clear the MasterSource and MasterFields properties of the detail
dataset. In the master's AfterScroll event handler call Detail.SetRange
to display the detail records for the current master then check
Detail.RecordCount.

--
Bill Todd (TeamB)
 
 
 

Master-Detail records

Post by George Kua » Tue, 21 Mar 2006 01:58:57

I cannot find a SETRANGE property for a dataset.
 
 
 

Master-Detail records

Post by George Kua » Tue, 21 Mar 2006 02:07:53

TDataset does not have a SETRANGE method. I did find the ISEMPTY property
that seems to work.
 
 
 

Master-Detail records

Post by Bill Tod » Tue, 21 Mar 2006 02:28:25


Sorry. I was not paying attention to which newsgroup I was in.
TADODataSet does not have a SetRange method. You mentioned IsEmpty in
your other message. Check carefully that IsEmpty works correctly. IIRC
AfterScroll fires before the detail dataset has been updated.

--
Bill Todd (TeamB)