Results 1 to 6 of 6
  1. #1
    smg is offline Competent Performer
    Windows XP Access 2010 64bit
    Join Date
    Apr 2019
    Posts
    121

    Navigation Form - query to report to nav form


    I have a form called Monthly Totals Report that prompts for Fiscal Year and Period via combo box/value list. It works just fine and passes the prompt values to the report header. However, when I try to add this form to a Navigation Pane Form it prompts twice and if I run the report outside the navigation pane form it does not pass the parameters to the report header.

    The query has the following parameter prompts:
    [Forms]![Monthly Totals Report]![cbFiscalYear]
    [Forms]![Monthly Totals Report]![cbPeriod]

    The Report header also has:
    =[Forms]![Monthly Totals Report]![cbFiscalYear]
    =[Forms]![Monthly Totals Report]![cbFiscalYear]

    The goal is to be able to run the report from it's corresponding form, from the Navigation Pane form and from reports.

    help

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    The navigation pane is where all the objects are represented (forms, reports, macros, modules, tables). A navigation form is a special kind of form.
    So I don't know what you mean by a navigation pane form. I guess either you created another form, you see it in the pane, and you added your form to it. Or you've added your form to a navigation form. Assuming the latter, your issue is probably due to not correctly referencing the form which has now become a subform.

    Try
    Forms![main navigation form].[NavigationSubform].Form
    If you didn't change the navigation subform control name, it is probably really named NavigationSubform.
    [main navigation form] is the name of your navigation form IIRC (I don't use navigation forms)
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    smg is offline Competent Performer
    Windows XP Access 2010 64bit
    Join Date
    Apr 2019
    Posts
    121
    Yes, Navigation Form, not Navigation Pane Form

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    so maybe you need
    Code:
    Forms![main navigation form].[NavigationSubform].Form.[cbFiscalYear]
    In case you're not aware, a navigation subform swaps the subforms in and out as you make form selections using the navigation buttons. Thus when you click a different button, the form you were looking at is unloaded and a different one loaded. So any code referencing a control on said form will fail if that particular form is not in view in the navigation subform control. Don't know if that is going to be an issue in your case or not. It has the potential to be an issue, depending on when your queries run and reports open if they're looking for values from those controls.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    smg is offline Competent Performer
    Windows XP Access 2010 64bit
    Join Date
    Apr 2019
    Posts
    121
    Thank you. After playing with it for a while I think I will not use a navigation form. I will use a switchboard instead as it seems to be more stable.

  6. #6
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Suggest you roll your own switchboard. After playing with the built in one (assuming 2010 has one) you will probably wish you'd stayed with the nav form!
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 6
    Last Post: 02-22-2018, 02:12 PM
  2. Replies: 3
    Last Post: 10-31-2014, 08:08 AM
  3. Replies: 12
    Last Post: 10-23-2014, 02:08 AM
  4. Replies: 3
    Last Post: 09-06-2012, 09:50 AM
  5. Report not opening from navigation form
    By librarian in forum Programming
    Replies: 3
    Last Post: 08-03-2012, 11:15 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