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

    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

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

  3. #3
    Join Date
    Oct 2011
    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