none
Using Combobox to Generate Report RRS feed

  • Question

  • I've been using YouTube for a month to teach myself Access.  I've been able to create a lot of useful reports for my job.  However, I am stuck with one report.  The report currently displays for every system in our inventory, all 50.  I would like to use a Combobox so our employees can chose a single system and generate the report.  I have three tables that are joined by the System Acronym name.  The field is called "Acronym".  The report is called "RptSystemProfile".  I would like to use a Combobox to select the "Acronym" and then generate the report for that specific "Acronym".  I know how to create the Combobox and select the Acronym.  I'm stuck after that on how to generate the report based on that selection.
    Sunday, December 8, 2019 1:20 AM

All replies

  • With the combobox After Update event use:

    DoCmd.OpenReport "RptSystemProfile", acViewReport, , "[Acronym]=Forms![NAME OF FORM HERE]![Acronym] ", acWindowNormal 'IF THE COMBOBOX CONTROL NAME IS 'Acroynym'
    DoCmd.RunCommand acCmdPrintPreview
    DoCmd.Close acForm, "NAME OF FORM HERE" 'OPTIONAL

    Sunday, December 8, 2019 2:29 PM