Results 1 to 3 of 3
  1. #1
    noweyout is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2011
    Posts
    10

    Where to start: user defined reports

    I have a report similar to a Class roster. My goal is to have the user select which class to print a report on, since there are multiple classes. Currently, I have it where the report shows all the classes and a list of students in that class.



    Here's my idea:

    I will have a command button which will bring up a small form with a combo box to select which class you want to view.

    Is it as easy as using the properties to do this for me? Maybe create a select statement and have it point to the combo box for a value? Any ideas?

  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
    Just use the ComboBox to place a WhereCondition Clause in the OpenReport command.

  3. #3
    blazerboy6 is offline Trained Beginner
    Windows 7 32bit Access 2007
    Join Date
    Apr 2011
    Location
    Portland, OR
    Posts
    28
    I've got several forms like this built to launch reports. Create an unbound combo box on the form which displays the class names and call it cboClassName.

    Assuming your form name is frmSelectClass, and the field name for class is [clClassName], add the following to the criteria for the "Class Name" field (ie. [clClassName]) within the forms query builder
    (click three dots on the side of the Record Source Property in Design View on the Report to get to this):


    IIf(IsNull([Forms]![frmSelectClass]![cboClassName]),[clClassName],[Forms]![frmSelectClass]![cboClassName])

    Add a cmd button to launch the Report next to it and you should be set.

    This will filter the report for the selected class, or if no class is selected, give you a report with all of them.

    Hope this helps,

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

Similar Threads

  1. User Defined Sorting in Form
    By sparlaman in forum Forms
    Replies: 6
    Last Post: 04-26-2011, 12:02 PM
  2. MakeTable Query with Variable user defined Name
    By Dinzdale40 in forum Programming
    Replies: 1
    Last Post: 03-09-2011, 11:26 AM
  3. Replies: 1
    Last Post: 07-07-2010, 04:22 PM
  4. Error: "User-defined type not defined"
    By mastromb in forum Programming
    Replies: 10
    Last Post: 01-08-2010, 02:57 PM
  5. How to add user-defined ribbon in access 2007
    By ali-gagi in forum Access
    Replies: 1
    Last Post: 07-02-2009, 07:01 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