Results 1 to 6 of 6
  1. #1
    carstenhdk is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    May 2010
    Location
    Denmark
    Posts
    42

    Question Msg-box - choose teamnumber

    Hi




    I have a table with students and their teamnumber.

    I want a report, that shows the students from each team. The dream scenario is a msg box with a combobox coming up when the report is opened. Which team would you like to choose? Is that possible in a report, or do I need to use a quiry?



    Thx

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,525
    A straight input box is as simple as having a criteria of:

    [Enter team]

    Access will prompt for team. To have that be a combo box, you'll need to create a form with a combo, and have either have the query get the criteria from there or use this technique to open the report:

    BaldyWeb wherecondition
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    carstenhdk is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    May 2010
    Location
    Denmark
    Posts
    42
    Ok, thx.


    I canīt seem to get this right. Is this code line supposed to be placed in the reports OnCurrent sub or..?

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,525
    Which code? The

    [Enter team]

    would be a query criteria, not code. The code from the link would go in the code opening the report, not in the report itself. Typically that would be behind a button, but could be anywhere.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    carstenhdk is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    May 2010
    Location
    Denmark
    Posts
    42
    Why canīt I get this to work?! The msg box comes up as planned, but the criteria is not applied. When I type the teamnumber 1, it also shows 2,3,4... and so on. I have tried entering the criteria in the "filter" and the the "Where" feild. Nothing works.

  6. #6
    kimmer is offline Competent Performer
    Windows 7 Access 2010 (version 14.0)
    Join Date
    May 2010
    Posts
    100
    Create a query that includes the fields fromthe table, including team number.
    In the grid, in the Criteria row for the Team number column, type:
    [Enter team]
    Run the query to test. If it doesnt work post back. If it does work, base your report on this query.

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

Similar Threads

  1. Automatically choose which report?
    By Lockrin in forum Reports
    Replies: 2
    Last Post: 12-28-2009, 02:41 PM
  2. Replies: 3
    Last Post: 09-26-2009, 01:57 PM
  3. How do I choose multiple records for a report
    By admaldo in forum Reports
    Replies: 2
    Last Post: 03-03-2006, 06:02 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