Tabbed form help

T

Tara

I have a form that has tabbed subforms. A client is chosen (or added) via
the parent form (frmContactInfo). The subform on the first tab (Referral
Data) then displays and/or allows the user to enter more specific data about
that client - how they were referred to us, why they were referred to us,
etc. Any given client may have several of these records based on how many
different times they have been referred to our agency. Each of these
referral records may then be used to create an additional set of data about
the specifics of each referral - what was the outcome, did the client accept
our services, etc - which should then be displayed on the 2nd tab (Assess
Info). When a client is first chosen on the parent form, the data in the
subform on the 1st tab updates correctly. But when I click the tab for the
2nd subform, the 2nd subform doesn't update. Currently the parent form is
linked to the 1st subform via a Client ID number. The data in the 1st
subform is then linked to the 2nd subform via a Referral ID number.
Currently I have the Default Value of the Referral ID on the 2nd subform set
to: =Forms!sbfReferralData!ReferralID

Any help is greatly appreciated!
 
M

Marshall Barton

Tara said:
I have a form that has tabbed subforms. A client is chosen (or added) via
the parent form (frmContactInfo). The subform on the first tab (Referral
Data) then displays and/or allows the user to enter more specific data about
that client - how they were referred to us, why they were referred to us,
etc. Any given client may have several of these records based on how many
different times they have been referred to our agency. Each of these
referral records may then be used to create an additional set of data about
the specifics of each referral - what was the outcome, did the client accept
our services, etc - which should then be displayed on the 2nd tab (Assess
Info). When a client is first chosen on the parent form, the data in the
subform on the 1st tab updates correctly. But when I click the tab for the
2nd subform, the 2nd subform doesn't update. Currently the parent form is
linked to the 1st subform via a Client ID number. The data in the 1st
subform is then linked to the 2nd subform via a Referral ID number.
Currently I have the Default Value of the Referral ID on the 2nd subform set
to: =Forms!sbfReferralData!ReferralID


How did you try to "link" the first subform to the second
subform? Using that DefaultValue in the second subform may
get the correct ID, but it doesn't do anything to filter the
records in the second subform.

The standard way to like two subforms is to add a hidden
text box (named txtLink) to the main form. Then use a line
of code in the first subform's Current event:
Parent.txtLink = Me.ReferralID
Now, the seconf subform *control* can use txtLink as the
LinkMaster: txtLink
LinkChild: Referral ID
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top