Question add another parent name from a form to a subform

Joe8915

Registered User.
Local time
Today, 05:29
Joined
Sep 9, 2002
Messages
820
I added a text box on my main form.

I have to other parent names in a subform that I would like to add to my main form. I have this working just using one parent name "dtdrec" that is working. How would I add "flduser" and "fldstuff".

=[tblPayEstimates Subform].[Form]![dtdrec]

I hope this make sense
sinse
 
I assume you are talking about the LinkMasterFields and LinkChildFields properties of the subformcontrol.

Just list the fields separated by semicolons in the same order in each of these properties.

BTW. These properties are strings and can be changed by VBA. However the error regime must be set to Resume Next before the first one is changed because the number of fields will not match until the second one is changed.
 
Gizmo, thanks for the quick reply.

Maybe this explains a little more:

To reference a value in a subform, use the following syntax for the text box's Control Source property:

=[subFormName].[Form]![ControlName]

where subFormName is the name of your master subform control, and ControlName is the name of your control that the detail records are filtered.

What I need to do is add more ControlNames.......................

How would I do this
 
The references in the LinkMasterFields can be anything. Even a control in a subform of an entirely different form so long as it is open.

The LinkChildFields must be fields in the recordset of the subform's SourceObject.

Add as many as you want between semicolons.
 
Galaxiom, sorry i have not got back to you. I was pulled off to another fire.
Still fighting this,
My subform is named tblPayEstimates
One of My field is named flduser

Everything works great with the above criteria
=[tblPayEstimates Subform].[Form]![fldUser]
Pulls everything correct.

Now is where it gets crazy. Now I want to add another field called fldstuff

I have tried
=[tblPayEstimates Subform].[Form]![fldUser]![fldstuff] .......error
=[tblPayEstimates Subform].[Form]![fldUser].[Form]![fldstuff] .......error
I tried to add colons, semi colons, coma's and quote marks and they all come out in errors.

Any other ideas? i can send attach snap shot if that would help?
 

Attachments

The picture doesn't help. You appear to have highlighted a field in the first subform record but where is it being displayed on the main form?
Are you trying to concatenate two fields? Are you trying to populate two separate controls? Are you trying to reference a field in one subform from another subform?


You do realize I hope that you can ONLY reference the CURRENT subform record this way. There is no way to reference a specific row.
 
You do realize I hope that you can ONLY reference the CURRENT subform record this way. There is no way to reference a specific row.

Pat, thanks for the reply. I found a work around finally after a few hours of thought and testing.

You are so right there is no way to reference a specific row. I had to add a another text field on the main form, to make it work.
 

Users who are viewing this thread

Back
Top Bottom