Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    moirakalichman is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2011
    Posts
    3

    Sync Sub Forms on Navigation Form

    I have created a navigation form and have 4 sub forms. All subforms share a common field SHAREID. Each form shows one record at a time. I want to sync the forms to always show the same record on each separate tab. (Tab1 would display the same SHAREID record as TABS 2-4) I have not been able to locate the Parent Child controls. Any suggestions? Tx

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    The LinkMaster/ChildFields properties are on the SubFormControl.

  3. #3
    moirakalichman is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2011
    Posts
    3
    I thought it would be there but I cant seem to find it. Any other suggestions? I have spent hours trying to find it.
    Tx

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I think the problem is in selecting the SubFormControl with ac2010. See if you can select the SubFormControl by using the ComboBox on the Property Sheet for the Form.

  5. #5
    moirakalichman is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2011
    Posts
    3
    I am not to sure what you are referring to so let me just put my ignorance out there...The fields that I am trying to connect the subforms with is not a combo box it is a text field. Is that the mistake? I have not worked with ms 2010 navigation form before.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Selecting the SubFormControl seems to be the issue here and it is doubly difficult when a Navigation Form is involved. I have a 2010 sample with this exact situation and had to use the ComboBox on the Property Sheet to actually select the SubFormControl. It took some hacking around but it does have the LinkChild/MasterFields properties on it.

  7. #7
    trolleri is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    43
    RuralGuy

    Is it possible for you to share the sample with the working layout as mentioned?

    I am having the same problem, and cannot link specific fields in the header of frmMain to subforms inside the navigation form in details section of frmMain

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I'm sorry but after two years I have no idea where that sample went. If I find it I'll post it.

  9. #9
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I believe what I was suggesting was looking at the property sheet for a control on the MainForm. At the top of the sheet is a ComboBox that can be used to select another control.

  10. #10
    trolleri is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    43
    Quote Originally Posted by RuralGuy View Post
    I believe what I was suggest5ing was looking at the property sheet for a control on the MainForm. At the top of the sheet is a ComboBox that can be used to select another control.
    I wish that was true, but I scanned all property sheets on all controls in frmNavigation, and still could not find it.

    My DB: dropbox.com/s/geh7sq8dmo3jy5u/26%20-%20DobbeltClickListBox-TRYOUT.accdb

    What I try to accomplish is this: When a record in the list box "SearchResults" in the form "frmSearch" is clicked, the field "SSN" of that record is used to open the matching records in alle the subforms placed under panes in the navigation form "frmNavigation". I tried it with this code:

    Code:
    Private Sub SearchResults_DblClick(Cancel As Integer)
    
        Dim stDocName As String
        Dim stLinkCriteria As String
    
        stDocName = "frmNavigation"
        stLinkCriteria = "[SSN]=" & Me![SearchResults]
        DoCmd.OpenForm stDocName, , , stLinkCriteria
        DoCmd.Close acForm, "frmSearch"
    
    End Sub
    ... but frmNavigation opens and simply show the first record of the respective subforms, and it is possible to browse the different records in alle the subforms. Thus the code do not make the subforms filter by a matching "SSN"-field.

    I plan to extend the header of frmNavigation to show the following fields from tblSubjects as read-only:
    "SSN", "SubjectNumber", "InclusionNo", "Firstname", and "Lastname"

    Maybe the panes (with subforms) in frmNavigation need to be tied together with a "SSN"-field in the header? How can this be done?

  11. #11
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I see your issue now but have no solution yet. I have not used NavHeaders before so it might take a bit to figure out what is going on. At the very least your [SSN] is a string so you would use a WhereCondition of: stLinkCriteria = "[SSN]='" & Me.SearchResults & "'"
    This didn't help so I'm still looking.

  12. #12
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I opened the frmVisit1Crf1 instead of the frmNavigation with the frmSearch code. The WhereCondition works as expected. It is pretty appearant the NavigationForm is altering the results of the form.

  13. #13
    trolleri is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    43
    Quote Originally Posted by RuralGuy View Post
    I opened the frmVisit1Crf1 instead of the frmNavigation with the frmSearch code. The WhereCondition works as expected. It is pretty appearant the NavigationForm is altering the results of the form.
    RG, what a briliant way to check the code, and thank you for the code corrections!

    I read somewhere that the Link Master Field and Link Child Field is not present in the navigation form. But also:
    ... create a brand new form, add a data source and drop a single field on the form, then drop the nav control on and add my subform by draggin and dropping, and then edit the nav button and add a where clause. pointing back to the field on the form it appears to work
    So in frmNavigation I put in some identification fields, and locked them (for security reasons). Those fields update correct according to what I doubleclick in frmSearch. For the sake of the overview, I decided to keep those identification fields in the header visible. Maybe it is possible to take the value from the locked identification field SSN, and use it on the control NavigationSubform to update the subforms within it accordingly? Both the control NavigationSubform and navVisit1Crf1 have events called "On Enter" and all the panes have "On Click". They even have a data control called "Navigation Where Clause", but I am struggling to get any code working. And yes I am very much a beginner in the world of Access.

    I feel that we are so very close to the finish line of this problem, that is why I hope I am not asking too much, when I request your help once more!

    Get the new draft here

    T

  14. #14
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Do you know you can zip up your db and attach it to a post here in the Go Advanced section?

  15. #15
    trolleri is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    43
    Quote Originally Posted by RuralGuy View Post
    Do you know you can zip up your db and attach it to a post here in the Go Advanced section?
    My database is too large (2 mb) for upload ;-)

    I have been trying different codes on the "Navigation Where Clause" of the tabs:
    Code:
    DoCmd.BrowseTo acBrowseToForm, "frmVisit1Crf1", "frmNavigation.NavigationSubform", "[SSN] = " & SSN
    
    and 
    
    DoCmd.BrowseTo acBrowseToForm, "frmVisit1Crf1", "frmNavigation.NavigationSubform", "[SSN]='" & Me.SSN & "'"
    None worked.

    Do I need a (locked and invisible) SSN-field on subform frmVisit1Crf1?

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. How to sync records in datasheet form?
    By degras in forum Forms
    Replies: 5
    Last Post: 02-17-2011, 09:43 AM
  2. Navigation form
    By Wayne311 in forum Programming
    Replies: 10
    Last Post: 02-10-2011, 01:06 PM
  3. Navigation Pane will not accept any forms
    By Alexandre Cote in forum Forms
    Replies: 0
    Last Post: 02-08-2011, 09:16 PM
  4. Replies: 1
    Last Post: 01-04-2011, 05:04 AM
  5. Split Form Sync up
    By jonsuns7 in forum Forms
    Replies: 1
    Last Post: 11-10-2009, 02:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums