MasterandChild Properties

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

when ever i attempt to link a main form with a subform I received the error
message, the datatypes are not the same. the datatypes i have chosen are
necessary and can not be changed. what is the solution?
 
Need more details, but if the fields are of different datatypes, how do they
relate to one another?
 
thank you. much clearer

Steve said:
Suppose you are creating a database about families. You would need the
following tables:
TblParent
ParentID
FatherFirstName
FatherLastName
MotherFirstName
MotherLastName
<etc>

TblChild
ChildID
ParentID
ChildFirstName
ChildLastName

You need both tables because there is a one-to-many relationship between
parents and children. You would create the relationship between ParentID in
TblParent and ParentID in TblChild.

To enter parents and children records, you would need form/subform. The
main form would be based on TblParent and the subform would be based on
TblChild. After you create the form/subform, open the form in design view,
select the subform control, open Properties and go to the Data tab. You will
see the LinkMaster and LinkChild properties. The LinkMaster property needs
to be set to ParentID in TblParent and the LinkChild property needs to be
set to ParentID in TblChild. After you do this, when you view a certain
Parent in your main form, you will only see that parent's children in the
subform.

Steve
 
Back
Top