Results 1 to 5 of 5
  1. #1
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    2,071

    child references to parent

    This statement (Me.Parent.OpenID) is not getting me the value of OpenID in the parent.



    What's missing?

    Thanks,
    Bill

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    are you trying to reference the field OPENID on the MAIN form from inside a subform? Or are you trying to reference a field on your main form in a query/report or other object?

  3. #3
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    2,071
    are you trying to reference the field OPENID on the MAIN form from inside a subform?

    Yes. Sorry, I didn't post the question very well. The sub-form code is responding to an event wherein it needs to know the current value of OpenID that is Dim'd and set in the parent.

    Bill

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    if the variable exists only inside vb code you would have to pass that variable to a field on your subform (you can set the visible property of that field to false if you don't want it to show) without seeing your form I'd be guessing but if you are referencing a FIELD from your subform it'd be something like

    forms!frmMainFormName!FieldName. If you're generating an OPENID from code you'd have to populate a field to reference it (or build a global function)

  5. #5
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    2,071
    While waiting for a better solution, I used a global variable in order to have access and advance my development. With your suggestion, I abandoned the global approach and added an invisible text-box to the main (parent) form and accessed the value using forms!frmRosterDetail!tbOpenID.
    Thanks,
    Bill

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

Similar Threads

  1. Changing controls in child from the parent
    By GraeagleBill in forum Programming
    Replies: 6
    Last Post: 03-30-2013, 05:06 PM
  2. Passing value from parent to child form
    By Pragmatic in forum Forms
    Replies: 1
    Last Post: 12-02-2011, 07:23 PM
  3. Child/Parent relationship
    By ErnieS in forum Forms
    Replies: 1
    Last Post: 08-20-2010, 01:22 PM
  4. Calculation using Child and Parent
    By SamanthaSamuels in forum Reports
    Replies: 3
    Last Post: 08-17-2010, 11:07 AM
  5. Parent/Child subform
    By Jerry8989 in forum Forms
    Replies: 1
    Last Post: 09-18-2009, 07:27 AM

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