Report based from a ListBox

K

KimmyGoose

I would like to create a report from a listbox on a form. The listbox
on the form is not based from a query. There are search options on the
form that change the listbox.rowsource via code. I would like to make
a print out of the records that are present in the listbox. I cannot
create a query based off of the listbox since the source is changed
every time the user uses the program. How can I creatre a report based
from the listbox rowsource?
 
L

Larry Linson

I would like to create a report from a listbox on a form. The listbox
on the form is not based from a query. There are search options on the
form that change the listbox.rowsource via code. I would like to make
a print out of the records that are present in the listbox. I cannot
create a query based off of the listbox since the source is changed
every time the user uses the program. How can I creatre a report based
from the listbox rowsource?

If you know what fields you want to report, you can create a report, and
replace its RecordSource with the RowSource of the Listbox. That's the
simplest situation and simplest approach.

A listbox would contain Fields, so at least you would have to know the
maximum number, and how large the Text Boxes would need to be to display
them.

Creating a new Report in Design View, completely from code, would be more
work than my clients would be willing to pay for (and perhaps more than I'd
care to undertake).

Larry Linson
Microsoft Access MVP
 
K

KimmyGoose

Thank you. I created a report were its recordsource was set equal to
the rowsource of the listbox on the form. I placed this code in the
open event of the report. Thanks for the help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Access Cannot select items in listbox 1
Filter a Listbox 27
ListBox help 1
Requery listbox 1
Open Report with Criteria From Form 6
Listbox query 3
Info on Report 3
Open Form based on Listbox 2

Top