Results 1 to 13 of 13
  1. #1
    jbickl is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2011
    Posts
    14

    Question Navigation Form prompts Enter Parameter Value

    Hello,

    I created a form, frmOCP, which has a combo box, cboFilterContract, in the header and a continuous form in the body. The continuous form populates with records based on the selection in the combo box (the combo box applies a filter to show just those records that are in the selected category). This form does exactly what I need it to do as a stand-alone.



    However, I also have a central Navigation Form, frmNavigation, with tabs to different forms, including frmOCP. When I click on the frmOCP tab in frmNavigation, I get an Enter Parameter Value pop-up box, asking for the following information: Forms!frmOCP!cboFilterContract. As it happens, when I type in the name of the category that I want into this pop-up, the parameter works and I get what I want (the continuous form populates properly). I don't want it to prompt with a pop-up box, since the user uses cboFilterContract to do this. How do I suppress the pop-up box?

    Many thanks!

  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 ac2010 Navigation Forms do *not* load the forms until selected so they are not in the Forms collection yet. As a result, your reference syntax that uses the Forms collection will not work as expected. I would try using the Me.Parent syntax described here: http://access.mvps.org/access/forms/frm0031.htm

  3. #3
    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
    Actually I have not tested it but the Navigation Form may *never* place the next form in the Forms collection. It may be in there similar to a SubForm.

  4. #4
    jbickl is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2011
    Posts
    14
    Thanks for your reply. I don't have much experience inputting custom syntax. In the reference syntax, I have tried different variations, such as Me!frmNavigation.frmOCP!cboFilterContract. None seem to work; they all continue to bring up the pop-up box. Is there a better way to do what I'm trying to do, or is figuring out this custom syntax the easiest?

    Again, many thanks!


    (frmNavigation is the main navigation form, frmOCP is the form I am trying to load, and cboFilterContract is the name of the combo box on frmOCP that has the information needed to filter the continuous form).

  5. #5
    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
    As a test try: FORMS!frmNavigation.FORM.frmOCP!cboFilterContract
    ...and see what happens.

  6. #6
    jbickl is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2011
    Posts
    14
    That gives me the same problem. I found a workaround: I've decided to rework the navigation form. Instead of having tabs, I just have buttons on the form that open pop-up windows with the various forms. The Enter Parameter Value box went away, since I am loading the original form and not a subform.

    Thanks very much for your advice!

  7. #7
    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
    Excellent!

  8. #8
    TomHolden is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2011
    Posts
    9

    Form in navigation form - combo box prompts

    Using buttons works nicely too, of course.

    You have to admit, the navigation form, containing tabs with forms, would have been pretty slick.

    I set up a form in the same way and I am seeing the parameter prompts also. I'll look at the suggestions and see if they work.

    Thanks,

    Tom

  9. #9
    TomHolden is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2011
    Posts
    9
    The form you put on the navigation form has become a "NavigationSubform" and reference paths to any parameters have changed.

    Long story short: You have to find any offending parameters in your form, and change references.

    I'll show you the code that fixed mine.

    On the form ("frmCampusBuilding") I am loading into the navigation form (I called "Navigation Form"), one ComboBox ("cboCustomerFacility") is dependent on the value chosen in another ComboBox ("cboCustomer").

    I had programmed the dependent ComboBox ("cboCustomerFacility") to get the current value in the parent ComboBox ("cboCustomer") using the following syntax in the WHERE clause in the Query populating the RowSource property of the "cboCustomerFacility" ComboBox.

    ... WHERE customerId = [forms]![frmCampusBuilding].[cboCustomer].[Value] ...

    Since my form ("frmCampusBuilding") is now a NavigationSubform object on my navigation form (that I called "Navigation Form") I have to reference "cboCustomer.Value" in a new way.

    [Forms]![Navigation Form]![NavigationSubform].[Form]![cboCustomer].[Value]

    ... for the line of code above to work for you, you'll need to change it to fit your use, like this:

    [Forms]![<your navigation form name>]![NavigationSubform].[Form]![<your combobox name>].[Value]

    ... the reason for all of this, again, is that the form you put on the navigation form has become a "NavigationSubform"

    Hope that helps. That's the answer.

    I didn't intend to be verbose... but wanted you to know it is a fixable problem. You just have to find any offending parameters in your form and change their references.

    Thanks,

    Tom

  10. #10
    jbickl is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2011
    Posts
    14
    Thank you! I may wind up changing the "homepage" back to a tabular interface, depending on the users' reactions to it... In any case, thank you for solving this.

  11. #11
    TomHolden is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2011
    Posts
    9
    I'm glad it works too. I'm using the navigation form now. My users will like this.

    I left reports (only), on the left nav. If I put them on the "navigation form" they lose their menu (for printing, refreshing).

    It is too bad you can't embed the report in a ReportViewer control so it keeps the print button, refresh button etc) and then drop that control onto a tab on the Navigation Form.

    Editing your form, after you modify the parameter references... should probably be done from within the Navigation Form -> NavigationSubform.

    I went into File->Options->Database Options and set the navigation form as the first form to display. I left the left nav but hid all object types, except reports.

    I'm going to bolt this down a lot more from the users but I'm impressed by Access, with regard to building something really quickly and the forms are free of quirks.

  12. #12
    nkuebelbeck is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Mar 2010
    Posts
    91
    Thanks, this thread helped me when I was incredible confused about why I was getting prompted!

  13. #13
    mslmk11 is offline Novice
    Windows Vista Access 2010 64bit
    Join Date
    Dec 2015
    Location
    Charlotte NC
    Posts
    1
    This information was definitely helpful and I tried some of the resolutions, but they didn't seem to work for me. I don't know if it's because I'm not using a subform in the mainform, or not.

    I have a main form (frm_Selection) that has multiple combo boxes, 3 are not dependent on each other and the rest are dependent on the first three, and then each other. [Start] (this is a date field)[cboDept] [cboLdrType] (these three are not dependent on anything) [cboLeader] (dependent on the first 3), [cboCrew] (dependent on first 4), [cboRptType] (dependent on [cboLdrType].
    I have an embedded macro to refresh on each of these on After Update. And for the [Start] I have the default value set to Max(formRecordSource!controlrRowSource), which I'd hope would give me the newest month begin date. I'm not sure if I need to have another embedded macro on one of the other event properties, like "get focus, lost focus" or something, so that the form recognizes that that CBO has a value set.

    For a long time, the form ran fine with no problem, everything went swimmingly, then all of the sudden, it started prompting me for each of these every time the form opened. The RowSource for most all of the CBO is based on a table, and I use the various CBOs to filter the options in the boxes. So I use the Forms!frm_Selection!controlname in the criteria field of the various columns I want to filter the results.

    I don't know if something just went haywire in the Access backend, or if I did something else outside of this form that could have impacted when the filters activate. Any help would be greatly appreciated!

    *UPDATE*

    I embedded a macro on the [Start] CBO (which is usually the first filter to be applied) with a 'requery' command on "On Focus". And that seemed to work for now.

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

Similar Threads

  1. Enter Parameter Value
    By kwooten in forum Queries
    Replies: 13
    Last Post: 08-11-2011, 02:35 PM
  2. Enter Parameter value?
    By hlcarlin in forum Forms
    Replies: 3
    Last Post: 07-06-2011, 08:09 AM
  3. enter parameter value
    By alliandrina in forum Access
    Replies: 1
    Last Post: 06-05-2011, 01:02 AM
  4. Enter Parameter Value
    By gutes2 in forum Forms
    Replies: 3
    Last Post: 03-03-2010, 05:03 PM
  5. Custom Query Parameter Prompts-- Problem
    By tylerthompson in forum Forms
    Replies: 11
    Last Post: 07-07-2009, 10:28 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