Acces 2013: Displaying first record in subforms

In the attached example, which I actually got from another expert, there a 3 subforms used in a master form "F__PPSAccounts". When I open this form it shows the first record of subform "S_ContractYears" and the first record of "S_Guarantees". But the other subform "S_RevSharePmts" doesn't show any records, even though for the combination of the other 2 subforms it should show 4 records. It is not until you click on the second record on "S_Guarantees" then back to the first record that it displays and records.

I need the 3 forms to show the relevant records as soon as the form is open. So in the attached example, when you open the
"F__PPSAccounts" form it should show:
2 records in "S_ContractYears" (416 and 417)
2 records in "S_Guarantees" (15 and 16)
4 records in "S_RevSharePmts" (27, 28, 29 and 34)

It's OK when you click on the second record in the "S_ContractYears" subform, but I need it to be correct as soon as you open the main form please
Form-Parent-Child-Grandchild--1-.accdb
rick_dangerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dale FyeCommented:
From my iPad, so cannot open your db.

Is this 3rd subform linked in a master-child relationship to the main form?  If so, how

If not, what is the query you are using for the subform.  If you are actually using a query in this subform, that is linked to the current record in the two other subforms, then you should have code in the Current event of those two other subforms with requeries the recordset in the 3rd subform.

Dale
0
rick_dangerAuthor Commented:
The 2nd subform is linked to the first, and the 3rd is linked to the 2nd.
The 2nd and 3rd subforms have tables as their recordsource

The OnCurrent Event on the 1st subform does this:
Me.Parent![S_RevSharePmts].Requery
Me.Parent![sfS_Guarantees].Requery

The 2nd subform has its Master field as: [S_ContractYears].Form![ContractID] (from the 1st subform)
and its Child field as: ContractID
Its OnCurrent Event does this: Me.Parent![S_RevSharePmts].Requery

The 3rd subform has its Master field as: [sfS_Guarantees].Form![GuaranteeID] (from the 2nd subform.
and its Child field as: GuaranteetID
Its does not have an OnCurrent Event.
0
Rey Obrero (Capricorn1)Commented:
try this
in the Load event of form "F__PPSAccounts", requery the subform "S_RevSharePmts"

private sub form_load()
me.S_RevSharePmts.requery
end sub
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Rey Obrero (Capricorn1)Commented:
another option is to use the current event of the form "F__PPSAccounts", depending on the way you are using the main form..

private sub form_current()
me.S_RevSharePmts.requery
end sub
0
rick_dangerAuthor Commented:
Thanks for taking the time!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.