link subform to a dummey field in the master form

Hi -
On my app I need to show a list of records and, upon a record is selected, thus becoming the "current" record of the form I need to display the entire details.
The below screenshot demonstrates the sought output.


In order to implement this, I have a master form "mform" and 2 subforms, "sf1", with the list of records, so it is of type "continuous forms" and "sf2" containing the detailed info, of type "single form". "As such "mform" is unbound: the records are shown in SFI and their detail in SF2 - SF2 is bound t the master table from which SF1 records are displayed

My problem is that whenever a new current record in SF1 is selected, I should have a means of modifying the  contents of  SF2.

I have tried to link SF2 to a dummy field in MFORM containing the  actual record key, but I am getting an error as ms/access thinks that the field name is a Parameter. Of course  also I cannot bound the dummy field to the master table and bound MFORM to it - ms/access yields an error as it thinks that I am trying to modify the record key

what shall I do?
 can anyone help?
João serras-pereiraAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

On a similar form I built, the Master link looks like:


so it is subformname.Form!PKname
João serras-pereiraAuthor Commented:
Could you elaborate just a bit?
I m scratching my head.

In the "current" on sf1 subform I have

Private Sub Form_Current()

    Me.F113_NumeroProjetoCorrente = Me.F113_NumeroProjeto
    Forms!F110_ConvencoesFinanciamentoMaster!F110_NumeroProjetoCorrente = Me.F113_NumeroProjeto
    If CurrentProject.AllForms("F91_LoggedUser").IsLoaded Then
        Forms!F91_LoggedUser!F91_NumeroProjetoCorrente = Me.F113_NumeroProjeto
    End If

End Sub

Open in new window

The field  
is the key in the master form, whichs correct
 shall i do:

subformname.Form!PKname =  Forms!F110_ConvencoesFinanciamentoMaster!F110_NumeroProjetoCorrente ?
You don't need ANY code or at most, you might need to requery the subform from the list form's Current Event


This is what the master/child link is designed to do - sync the child form to the current record of the master form.
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
1. Put a hidden control on the main form.

2. For the control that holds sf2, set the master link to the name of the hidden control.

3. In sf1's OnCurrent event, put the value of the key into the hidden control on the main form:

   Me.Parent.<control> =

Now when sf1 changes, the OnCurrent will fire, the value will be placed in the hidden control, and sf2 will change based on that.


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
João serras-pereiraAuthor Commented:
Hi Thanks!
I (thought I) had it that way. But started all over again and now it works!!!
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.