Results 1 to 11 of 11
  1. #1
    GraemeG is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Feb 2011
    Posts
    152

    Subform ControlSource Popup issue

    Hello.

    I have a command button which is password protected by a custom form with a password txtbox. If the password is correct I want it to then open a form.

    However the issue is - I want to open up this form as a subform on the controlsourceobject in my main form.

    Is this possible?

    My main form is called: RRC MAIN
    The controlsourceobject is called: subControlSource


    The popuppassword form is called: FrmDataEditorLevLoginScn
    The form I want to open in the object source is called: FrmAddData

    Any help much appreciated
    Last edited by GraemeG; 04-06-2011 at 03:13 PM.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Try

    Me.subControlSource.SourceObject = "ThirdFormName"
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    GraemeG is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Feb 2011
    Posts
    152
    Quote Originally Posted by pbaldy View Post
    Try

    Me.subControlSource.SourceObject = "ThirdFormName"
    That is what I am using for commands on the main form. this does not work on a pop up, as the popup is another form and does not contain the sourceobject.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    I'm not clear on the setup, but to set some other form's subform this should work:

    Forms!OtherFormName.subControlSource.SourceObject = "ThirdFormName"
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    GraemeG is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Feb 2011
    Posts
    152
    Quote Originally Posted by pbaldy View Post
    I'm not clear on the setup, but to set some other form's subform this should work:

    Forms!OtherFormName.subControlSource.SourceObject = "ThirdFormName"
    Code:
     Forms!RRC_MAIN.subControlSource.SourceObject = "FrmLifeCycleCosts"
    I have tried this and I get a 2450 error.
    Riverside Control Centre can't find the Form 'RRC_MAIN' referred to in a Macro or Visual Basic Code

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Is that form open?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    GraemeG is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Feb 2011
    Posts
    152
    Quote Originally Posted by pbaldy View Post
    Is that form open?
    Yeah it is constantly open. and is open in the background when the popup password form opens.

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Then the name is incorrect. Could it be a space instead of an underscore? If so you'll have to bracket the name.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    GraemeG is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Feb 2011
    Posts
    152
    Quote Originally Posted by pbaldy View Post
    Then the name is incorrect. Could it be a space instead of an underscore? If so you'll have to bracket the name.
    No the form name has an underscore.
    It still does not find it whether I name the form with an underscore or not.
    How would I bracket the form up anyhow?
    Code:
        Forms![RRC_MAIN]!subControlSource.SourceObject = "FrmLifeCycleCosts"
    ?? This does not work

  10. #10
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Can you post the db?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  11. #11
    GraemeG is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Feb 2011
    Posts
    152
    Quote Originally Posted by pbaldy View Post
    Can you post the db?
    not particulary it has got senstive data in it. Without the data it would be hard to understand.

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

Similar Threads

  1. Subform Link Issue
    By danhartman in forum Forms
    Replies: 7
    Last Post: 07-06-2010, 07:14 AM
  2. How to solve this subform issue?
    By Patience in forum Forms
    Replies: 2
    Last Post: 06-28-2010, 07:09 AM
  3. Form-Subform-Popup Problem
    By TrudyD1474 in forum Forms
    Replies: 1
    Last Post: 06-10-2010, 05:36 PM
  4. Subform scrolling issue
    By Jerry8989 in forum Forms
    Replies: 4
    Last Post: 12-08-2009, 01:12 PM
  5. Subform Data Entry Issue
    By yuriyl in forum Forms
    Replies: 3
    Last Post: 05-14-2009, 08: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