Subform question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a subform that has [date] [life company] and [age] while the main form
has [ClioentFirst] and [ClientLast], among others. When I input the info in
the subform, the subform table is only populated with the [ClientLast] and
NOT the [ClientFirst]. How do I populate the subform table with the first and
last name?

Thanks,

John
 
In the parent and child properties of the sub form frame, you can link the
sub form to the main form with two fields

Parent: ClioentFirst ; ClientLast
Child: ClioentFirst ; ClientLast

Assuming that the fields has the same name
 
I have a subform that has [date] [life company] and [age] while the main form
has [ClioentFirst] and [ClientLast], among others. When I input the info in
the subform, the subform table is only populated with the [ClientLast] and
NOT the [ClientFirst]. How do I populate the subform table with the first and
last name?

Ofer's got one good suggestion - linking on both fields - but I'd
really want to suggest that you add a ClientID. Names are NOT unique;
I know three people named Fred Brown, and you have no way of ensuring
that you might not have two clients who happen to share the same name.

You may want to use an Autonumber ClientID (concealed from user view),
with the subform link provided to a Long Integer ClientID.

John W. Vinson[MVP]
 
Thanks John - good point - I added the ID but nothing changed - not sure what
to do???

Thanks,

John
John Vinson said:
I have a subform that has [date] [life company] and [age] while the main form
has [ClioentFirst] and [ClientLast], among others. When I input the info in
the subform, the subform table is only populated with the [ClientLast] and
NOT the [ClientFirst]. How do I populate the subform table with the first and
last name?

Ofer's got one good suggestion - linking on both fields - but I'd
really want to suggest that you add a ClientID. Names are NOT unique;
I know three people named Fred Brown, and you have no way of ensuring
that you might not have two clients who happen to share the same name.

You may want to use an Autonumber ClientID (concealed from user view),
with the subform link provided to a Long Integer ClientID.

John W. Vinson[MVP]
 
Thanks John - good point - I added the ID but nothing changed - not sure what
to do???

Well, just adding the ID won't change your forms, or your queries, or
much of anything else. Just what did you do? Did you add a numeric
foreign key to the second table, define a Relationship in the
relationships window, and use that field as the master/child link
field? You'll also need to populate the foreign key field using an
Update query linking on the names, if you already have data in the
tables.

John W. Vinson[MVP]
 
Back
Top