Results 1 to 10 of 10
  1. #1
    Join Date
    Dec 2010
    Posts
    12

    Can't Tie a Field In A Subform To a Field In Main Form (worked in 2003, not in 2007)

    Summary:


    Need to tie a field value (sjobID) in a subform to a field value (jobID) in a main form in Access 2007

    Parent Form: "Form1"
    Parent Form field: "jobID"
    Sub Form: "sfrm_Container"
    Sub Form field: "sjobID"

    Previously used "=[Forms]![Form1]![jobID]" in the sjobID in Access 2003

    Question
    I have a main form called "Form1" and a subform called "sfrm_Container" which holds 2 nested subforms. The form (Form1) and subform (sfrm_Container) are linked by jobID and sjobID.

    I need the field called "sjobID" in "sfrm_Container" and have the value be equal to the "jobID" in "Form1". In Access 2003, I was able to do this using this formula: =[Forms]![Form1]![jobID]. However, this no longer works in 2007.

    Any suggestions? Does this need to be done through the code builder now in the main form's onCurrent? Any help would be much appreciated.




    sjobID - is the name of the field that is being pointed to.

  2. #2
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    open the properties window of the subform control, on page "Data", setup "Link Child Felds" to sjobid and "Link Master Fields" to Jobid

  3. #3
    Join Date
    Dec 2010
    Posts
    12
    Quote Originally Posted by weekend00 View Post
    open the properties window of the subform control, on page "Data", setup "Link Child Felds" to sjobid and "Link Master Fields" to Jobid
    That relationship does already exist.

  4. #4
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    so it show work. what is wrong? does the subform not show the right record?

  5. #5
    Join Date
    Dec 2010
    Posts
    12
    Quote Originally Posted by weekend00 View Post
    so it show work. what is wrong? does the subform not show the right record?
    Thats what I thought. When you cycle through the main form however, the subform will not update along with the record being displayed in the main form.

    This is frustrating since it worked fine in 03, but our company updated to 07 and there is no option to keep 03.

  6. #6
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    I don't use 2007.

  7. #7
    Join Date
    Dec 2010
    Posts
    12
    Quote Originally Posted by weekend00 View Post
    I don't use 2007.
    lucky..... thanks for your help though. I've gone through and checked all of the formulas in the forms as well, and those don't appear to be related to the jobIDs either. thought it might be something there, but no luck.

  8. #8
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    may you create a new form and new sub form, to see if there is surprise?

  9. #9
    Join Date
    Dec 2010
    Posts
    12
    Quote Originally Posted by weekend00 View Post
    may you create a new form and new sub form, to see if there is surprise?
    Thanks - when I tried that, it didn't work. But, I tried it again as you suggested, but it still didn't work.

    What I did notice though was that 2007 defaulted the new subform to having a record source from one of my tables, rather than leaving it unbound. After tinkering with that, and resetting the table source back to the default, it appears that has resolved it.

    No idea why thats necessary now, as I believe that the code would have taken care of this. Either way - thanks for your assist. Helping me talk that through led to the solution.

    Thanks!

  10. #10
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    Merry Christmas.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 11-13-2010, 12:57 PM
  2. Replies: 3
    Last Post: 11-05-2010, 03:10 PM
  3. Access 2010 fails where 2007 worked
    By dick in forum Access
    Replies: 3
    Last Post: 10-16-2010, 01:20 AM
  4. Update field in subform from field in Main
    By jpkeller55 in forum Access
    Replies: 9
    Last Post: 10-15-2010, 03:37 PM
  5. form - subform field mapping
    By nqirar in forum Programming
    Replies: 2
    Last Post: 03-02-2009, 01:49 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