Form for Parameter Report

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PotatoChip
    New Member
    • Jan 2008
    • 26

    #1

    Form for Parameter Report

    I am working in Access 2002 and I have been asked to create a form for a report based on a paramter query so that the user selects the department from a drop down list on the form, query runs and voila opens your report.
    Now, I have successfully done this, following the steps in a How-to I got off Microsoft's website, with just a form and a query. When I follow their instructions for the query-form-report, I get the form to open, select my department and click ok and then I get the parameter dialog box prompter (the same one you get when opening a parameter query) asking me to type in the department. I'm going insane trying to figure this out. Would it matter if the department drop down is driven by a different table than the one in the report?? The one in my form is from the same table that drives the lookup in the main table so I shouldn't think it would make a huge difference. Part of the problem is, I was given half it to create on my own and half of it already done. So I had to redo the query but I really, really, really don't want to have to redo the report. At this stage, I can't even remember what I've got set up and what I've changed. HELP!!!!

    PotatoChip, the desperate.
  • Zwoker
    New Member
    • Jul 2007
    • 66

    #2
    Hi,

    Are you asking how you can use your Form based selected department in your query criteria automatically?

    If so, if you add the following to the criteria field in your query, it should work:
    Forms!<FormName >!<ControlNam e>
    E.g. Forms!MyForm!Se lectDept

    If you have spaces in the name in your form or control then you would need to use square brackets, like:
    [Forms]![My Form]![Select the Dept]

    If you want an "all" mechanism it is a bit more complicated, with the basic requirement to wrap the parameter is a "Like *", and watch for Nulls.

    Let me know if you need more details, or if I have completely misunderstood your question. :)

    Comment

    • PotatoChip
      New Member
      • Jan 2008
      • 26

      #3
      Sorry for the lack of clarity. I was ready to tear my hair out when I posted. What I wanted was a form to show a drop down list for the department which would then open the report based on the department selected, which was all based on a parameter query. However, trooper that I am, I gave up only to be told that the regular prompt for a parameter report was good enough.

      Thanks anyways!

      Comment

      Working...