Trouble with a form with two subforms (1 Viewer)

atrium

Registered User.
Local time
Today, 17:23
Joined
May 13, 2014
Messages
348
The module is a Help File. I have a form that displays the index of Help Topics in the left hand subform and the detail of the of the selected index topic is displayed in the right subform. This works OK
My problem is that I want it to respond to in context responses. When the user is in the main project that this is being written for I want a "HELP" button that they can use and the help form will popup and display the index and the detail relative to the position where the help button was pressed.

The Help button carries the Category and the subcategory of the Help file entry to the Help form - but I only get a blank details subform

I have included 2 images the first one is the help form with both subforms displaying as they should. The other is the form with the blank details subform.

I read some where that to get it working I need to be able to set up a "Mainlink" that use at the Parent form level that both subforms refer to - but I'm stumped

Help1 (1).PNG
Help2 (1).PNG
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 14:23
Joined
May 7, 2009
Messages
19,169
put your Help form in Design view.
what is 0400 there? if label, change it to textbox (txtHelpID).
click on the Border of the Subform.
on Property Sheet->Data:
Link Master Fields: txtHelpID
Link Child Fields: theCategoryFieldName
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 06:23
Joined
Jul 9, 2003
Messages
16,245
Do you mean something like this'-


More info on Nifty Access Here:-


To get a free copy of the download, contact me ..
 

atrium

Registered User.
Local time
Today, 17:23
Joined
May 13, 2014
Messages
348
put your Help form in Design view.
what is 0400 there? if label, change it to textbox (txtHelpID).
click on the Border of the Subform.
on Property Sheet->Data:
Link Master Fields: txtHelpID
Link Child Fields: theCategoryFieldName
 

atrium

Registered User.
Local time
Today, 17:23
Joined
May 13, 2014
Messages
348
Thanks arnelgp,
That fixes the right hand form displaying the details, now my index on the left is not responding. It's there but when I click on the SubCategory the right hand one doesn't move
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 14:23
Joined
May 7, 2009
Messages
19,169
what is the 0400 (the one you encircled)? what is it's ControlName?
is it bound? (it shouldn't be).

on the click event of Category/SubCategory on the Left Subform, add code:

private sub Category_Click()
Me.Parent!txtHelpId = Me!SubCategory
end sub

private sub SubCategory_Click()
Call Category_Click
end sub
 

atrium

Registered User.
Local time
Today, 17:23
Joined
May 13, 2014
Messages
348
The 0400 in the parent form is unbound and it's name is MainLinkFld
The onClick for the Category in the left hand form is
Code:
Private Sub CategoryFld_Click()
' I want the subform window on the right to display the SubCategory detail
' Change the record pointer of the parent form using the  subcategory
'The Sub Category value is unique

[Forms]![TogasHelpFrm].[MainLinkFld] = Me.SubCategoryFld       ' It would not allow me to use  Me.TogasHelpForm.MinLinlFld

End Sub

The onClick for the SubCategory in the left hand form is
Code:
Private Sub SubCategoryFld_Click()
' I want the main window on the right to display the SubCategory detail
' Change the record pointer of the parent form using the  subcategory
Call CategoryFld_Click

End Sub

The same thing happens. When I click on the SubCategory of any of the list of topics in the left form, the field MainLinkFld in the parent changes to the one I click.
But the right subform is still displaying the same screen
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 14:23
Joined
May 7, 2009
Messages
19,169
you need to make the Link Child Fields of the right subform to SubCategoryFld (not CategoryFld).
 

atrium

Registered User.
Local time
Today, 17:23
Joined
May 13, 2014
Messages
348
This is the links for the right hand side subfolder
rightsidesubform (4).JPG
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 14:23
Joined
May 7, 2009
Messages
19,169
change the Link Master Fields: MainLinkFld
 

atrium

Registered User.
Local time
Today, 17:23
Joined
May 13, 2014
Messages
348
You are Mr Magic. It's now working fine

Thank you very much
 

Users who are viewing this thread

Top Bottom