Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2008
    Posts
    27

    Unanswered: Selecting certain records from a table, and put into report

    Hi guys

    I have a very simple database with one table, which has a list of equipment, each with it's own unique ID.

    I want to be able to select different pieces of equipment (i.e. by typing in the unique ID number) these different records will then be presented in a report.

    How do I go about doing this?

    Many thanks for your help and time
    Adam

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    You can pass a criteria when opening the report:
    Code:
        DoCmd.OpenReport "ReportName", acViewPreview, , "ID IN ( 1, 4, 15, 19 )"
    Or if ID is not defined as a numeric value, you use:
    Code:
        DoCmd.OpenReport "ReportName", acViewPreview, , "ID IN ( '1', '4', '15', '19' )"
    Have a nice day!

  3. #3
    Join Date
    Oct 2011
    Posts
    16
    Or, make your report based on a querry whose criteria is the different IDs you want reported on.

Posting Permissions

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