Link to home
Start Free TrialLog in
Avatar of EclecticBob
EclecticBob

asked on

Unable to link Subform to another subform

I have a form with two subforms. The first subform is linked to the master form with the SKU fields and works perfectly. I want the second subform to link ManufPartNo which is a field on the first subform. I created a textbox on the main form named MPn and set it's control source as follows:

 =[frmInventoryDetailsSfrm].[Form]![ManufPartNo]

When I try to link the second subform, the field MPn is not on the Master Fields list.

This has always worked for me when I was using Access 2000, now I'm using Access 2010. What am I doing wrong?
Avatar of Boyd (HiTechCoach) Trimmell, Microsoft Access MVP 2010-2015
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP 2010-2015
Flag of United States of America image

Try manually entering (I copy and paste) the control name in the master linking field property.

 I have always manually entered the value in the property.  I know that works in all versions
Avatar of EclecticBob
EclecticBob

ASKER

Thanks but I tried that, I get a dialogue saying "The text you entered isn't an item in the list." It  then drops down the field list and will not accept anything other that what's in the list.
SOLUTION
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Jeff, I understand all this but what I want to do is link a subform to a field on another subform. I have done this before in Access 2000 using the method described here:

http://www.fmsinc.com/MicrosoftAccess/Forms/Synchronize/LinkedSubforms.asp

Scroll down the page and read the section titled:
A Subform Cannot Link to Fields in a Subform of its Parent

Now that I'm using Access 2010 I cannot get the solution as described in the article to work.
OK, now I understand...

So then you can filter the second subform's recordsource by the first subform link value

Then requery the second subform on the first subform's current event.

There may be another way, but this works fine for me in Access 2010
;-)

JeffCoachman
Access--eeq-28341825--Link-sync-.accdb
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It would not allow me to enter anything in the Link Fields that was not on the drop-down list.

However, all your answers put my brain to work and I found another solution. I'm not a professional, this database is used to run my own business and everything is self taught so this may not be the best solution.

In the main form I created a text box  named MPn with the following code:

 =[frmInventoryDetailsSfrm].[Form]![ManufPartNo]

I then created the following sub on the main form:

Private Sub Form_Current()
 Me![RB_INVENTORY].Form.Filter = "[CatalogNo] = '" & Me![MPn] & "'"
 Me![RB_INVENTORY].Form.FilterOn = True
End Sub

So, I'm filtering the second subform from the main form based on a field in the first subform.
It works perfectly.

Thanks all for your help.