Connecting Tech Pros Worldwide Forums | Help | Site Map

Master Detail Question

Jim Bob
Guest
 
Posts: n/a
#1: Nov 13 '05
I Have a form with two datagrids bound to two tables in a dataset. The
top datagrid is a master and the one below it is a detail.

I want to be able to click on a row in the master and fire an event to
update the botton grid with detail records related to the master. I
havnt been able to find such a simple way to do this. Is this correct?
How can I do this?



jwc

*** Sent via Developersdex http://www.developersdex.com ***

pfranklin
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Master Detail Question


Hi Jim Bob

I assume that the "datagrids" are subforms, with their record sources
the master and detail tables.

Put a control on the main form with its control source something like:

=[MasterSubform].[Form]![MasterId]

Then link the main form to the detail subform, using this control as
the master field and the foreign key in the detail table as the detail
field.

HTH

Closed Thread


Similar Microsoft Access / VBA bytes