I am trying to Create a report by passing all the values in a list box( rather than selected). How can i do this.?
I am trying to Create a report by passing all the values in a list box( rather than selected). How can i do this.?
Usually a listbox has a record source such as a table or query, so why not just base the report record source on the same thing?
Maybe I'm not understanding...
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
Code:if IsNull(lstBox) then sWhere = null else sWhere = ..items in listbox endif docmd.OpenReport "rptname",acViewPreview,,sWhere
I have a list box(Invest) in a form(Review) and i want to generate a report by passing all the values of a list box to the report.
so, right now whats going on is - The report is generated only for 1 selection in the list box. but i want the report to be generated for all the values(multiple) in the list box.
Is this possible.?
You haven't provided any info that addresses what I already wrote although I will admit to using the wrong terminology - record source instead of row source.
I repeat; if your listbox has a table or query as its row source, base your report on that. If the source is a value list, then that's an entirely different scenario and you have to inform us about that.
If you're saying you want to use all the listbox row data (which would be the bound field if there's more than one listbox column) as criteria, that's a different thing again. You either "create" a report manually in design view or you use the report wizard. Creating is one thing. Populating one (assigning it a record source) is another matter. Not sure which it is you're talking about.