I currently have a list box called lstReportEmploy ee and a Query called records. In the query under the field "[Employee ID]" I have the criteria set to the selection made in the list box [Forms]![ReportOpener]![lstReportEmploy ee]
Now on the form [ReportOpener] I have a button cmdCreatePDF which based on the selection from lstReportEmploy ee, exports the report "Letter Report" to PDF ("Letter Report" is...
User Profile
Collapse
-
Multiselect list box as query criteria?
-
The main report doesn't have a record source. It is mainly a place holder/template for the two subreports.
The main report has 3 paragraphs of text for the formal letter followed by the two subreports which should display the employee records -
I deleted the subreports and got a run time error '2491'
The actions or methis is invalid because the form or report isn't bound to a table or query.
I tried your original way again with the list box and now I am getting an error with my Debug.Print line (I added the subreports back)
...Code:Private Sub cmdExportAllToPDF_Click() Dim itm As Variant Dim Fltr As String
Leave a comment:
-
The significance of the combo box was to save/print each employee individual but to loop through rather than having to save/print each report manually.
I was working on the original code you provided that used a multi select list box. I created a list box with the same fields as the combo box.
However, the report is still not updating with the records based on the employee selected. It may have to do with the fact...Leave a comment:
-
Also, I forgot to mention my 'Letter Report' has two subreports which displays two tables of the employee records(which updates when the employee name is selected from the combo box)Leave a comment:
-
Oh sorry no. I was trying to loop through all the employees and create individual PDF for each, and you're saying that is not possible with a combo box?Leave a comment:
-
Ok thanks. I'll try this out. I just checked my form and it is a combo box not a multi select list box.Leave a comment:
-
PhilOfWalton,
Yes, that is what I am trying to figure out. Should I call to the table that contains the records and include the column and inCount of the combobox to match to the records?Leave a comment:
-
Need help with combo box loop/open report
I currently have a form that contains a combobox with all the employee names. The combo box calls to a table that contains all of the employee records and generates a report based on the selected employee
I have two buttons, export individual report which is done by selecting an employee from the combo box and once the button is clicked exports the report to PDF to the path written
The second button exports all reports as...Last edited by zmbd; Jul 23 '16, 02:22 PM. Reason: [z{added code tags, please read the posting instructions}]
No activity results to display
Show More
Leave a comment: