Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2003
    Posts
    300

    Red face Unanswered: Report Selection

    I have a report that I want to have the user enter in the criteria for date and a combo box to select the value stored in the table/query..

    I figured out how to do the date..
    Between [Enter a Start Date] And [Enter an End Date]

    But how do I provide a combo box, all I have been able to do is
    [Enter Classification] but this is not what I want..


  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Where do you place the combo?
    Have a nice day!

  3. #3
    Join Date
    Nov 2003
    Posts
    300
    The combo exists in the table, on design view, Field Name, Field Properties, click on the Lookup TAB and the Display Control is a Combo Box

  4. #4
    Join Date
    Nov 2003
    Posts
    300
    What I want is when the user clicks a button[form control] for opening the report, they get a popup box that asks them to enter a date range - which is what I have now- and then to popup a box with the combo box so they can select the CODE, or CLASSIFICATION .

  5. #5
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    A combo in a table? Are you sure? This means that the table must be open when you print the report. There must be a form somewhere, what's the code in it?
    Have a nice day!

  6. #6
    Join Date
    Nov 2003
    Posts
    300
    YES: This is what I am trying to explain--The combo exists in the table, on design view, Field Name, Field Properties, click on the Lookup TAB and the Display Control is a Combo Box
    So, when the user selects the report to print, I want them to Choose which value is in the field, rather to type it in the box incorrectly..

    I hope this explains it well.

  7. #7
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    If you want to specify conditions for printing the report, you have to build a form where the user can specify these conditions (Filter, Criteria or OpenArgs), format the user's input and pass the necessary parameters (Filter, Criteria or OpenArgs) to the report in the DoCmd.OpenReport method.
    Have a nice day!

  8. #8
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Quote Originally Posted by databasemon View Post
    The combo exists in the table, on design view, Field Name, Field Properties, click on the Lookup TAB and the Display Control is a Combo Box
    I wouldn't recommend using the Lookup tab on a field. Although nice if you don't want to design a form to update data in a table and let users edit the table itself (which is not recommended), it's a nightmare for other developers to work with Lookups on a field. Instead, use relationships and link the tables in the recordsource query of your report and design forms to update any data.

    I'm working on another developers mdb now where they used the Lookup tab extensively on dozens of fields in their table. It's a pain-in-the-#@@ tracking down all these or writing any queries against the data.

    Trust me, it will make your life sooo much easier if you need to make revisions/troubleshoot the mdb a year or so from now.

    You may also want to consider just designing a criteria type form as in this example: http://www.dbforums.com/6274791-post21.html.

    There's some more examples like this in the MSAccess code bank.
    Last edited by pkstormy; 04-14-10 at 21:08.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •