Results 1 to 3 of 3
  1. #1
    .:SoundWave:. is offline Novice
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Dec 2010
    Posts
    11

    How to OpenForm from NavigationSubform in same subform?

    Okay, I have two forms Navigation Form, and a continuous form that shows up as the Navigation Form's subform.

    The continuous form is laid out to show me all records based on a search. For each record that's displayed, an command button displays beside it. So, when using the Navigation form, the command button is located within the subform. The command button (btnEditRecord)'s OnClick event is configured as such using a macro:

    OpenForm
    Form Name: frmEditRecord
    View: Form
    Filter Name: (blank)
    Where Condition = =" [ID]=" & [txtID]
    Data Mode: (blank)


    Window Mode: Normal

    When the btnEditRecord is clicked, frmEditRecord opens as an entirely new window, displaying frmEditRecord and pre-loading all the correct information.

    The problem is, I don't want it to open as a new window. What I want to happen is that when btnEditRecord is clicked, frmEditRecord opens in the Navigation Form's subform.

    I've tried editing the Where Condition clause with various permutations of [Form]![Navigation Form]![NavigationSubform].[Form]![frmEditRecord]=" [ID]=" [txtID] thinking that might work. Unfortunately, along with breaking data entry, frmEditRecord ALWAYS opens in a new window.

    What am I doing wrong, and more importantly, how can I get it right?

  2. #2
    .:SoundWave:. is offline Novice
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Dec 2010
    Posts
    11
    Figures I'd figure out the solution after I posted here.

    For anyone new like me who might be wondering how to open a continuous form while in a Navigation subform from that same subform using a command button... here's the Macro I used:

    BrowseTo
    Object Type: Form
    Object Name: frmEditRecord
    Path to Subform Control: (blank)
    Where Condition = =" [ID]=" & [txtID]
    Page: (blank)
    Data Mode: Edit

    When the command button is clicked, the form that it was located on will disappear/close and be replaced by frmEditRecord.

    Edit: Forgot to mention that the macro is used for the command button's OnClick event.

  3. #3
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Thanks for posting back with your successful solution. Why don't you go ahead and use the Thread tool and mark this thread as Solved?

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

Similar Threads

  1. Getting to a tab on openform
    By Swarland in forum Programming
    Replies: 5
    Last Post: 12-12-2010, 11:22 AM
  2. OpenForm in subform not working
    By eyuen in forum Forms
    Replies: 3
    Last Post: 11-10-2010, 12:03 PM
  3. OpenForm macro
    By tguckien in forum Forms
    Replies: 3
    Last Post: 07-06-2010, 09:12 AM
  4. DoCmd.OpenForm Modification
    By alsoto in forum Forms
    Replies: 6
    Last Post: 05-01-2009, 07:28 AM
  5. OpenForm Action and Arguments
    By nkenney in forum Forms
    Replies: 9
    Last Post: 04-05-2009, 09:33 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