B
Bob Quintal
(e-mail address removed) wrote in
and link parent fields are properly set, in your case to the Unit_ID
in both parent and child, this should be populated automatically in
the subform when you add a new record to the subform.
If you have a subform embedded in a form, and the link child fieldsI'm currently working on a personal database to manage family-tree
type data and have come across a problem.
To note off the bat, I'm very new to Access and am essentially
teaching myself as I go by picking apart template databases and
playing with my own "test" databases. I only yesterday figured out
that most of my hitches now require macros or visual basic coding
so I've been trying to learn that too. I figured out how to have a
new form open to a related record, and how to have a new form open
in add mode, but I'm not sure how to have it open a new form in
add mode and automatically fill in a value based on the form it
was opened from. More specifically, I have a "Family Unit" form
that shows mother, father, and children (as subform) and want a
user to be able to add a new child and have the "Unit_Id" value
for that new FamilyMember to automatically be filled in to match
the Unit_Id from the active Family Unit.
I've looked around on various templates for a similar situation
with coding that I could take and adapt, but so far with no luck.
I feel like this should be coding as simple as the "open form to
related record" situation....is it and could you let me know the
solution? Or should I sit down and read all those dense chapters
that explain macros and visual basic first?
Thanks a lot,
Ribs
and link parent fields are properly set, in your case to the Unit_ID
in both parent and child, this should be populated automatically in
the subform when you add a new record to the subform.