How to pass all of the items in the listbox to a report

R

Rino

Greetings,

I hope someone could help me with this problem. What I'm trying to do
is to pass all of the items located in the listbox to a report. The
list box is not based on table/query, but value list (I am not sure if
this is important info or not).

Example:

ListBox
1, PN123, bla bla bla, $123
4, PN223, blah blah, $223
2, PN777, bla blah bla, $333

Report after values have been passed to should look like this:

Quan Part No Description Price
1, PN123 bla bla bla $123
4, PN223 blah blah $223
2, PN777 bla blah bla $333


I've tried with this line to at least pass the value for the quantity
but it gives me an error
=[Forms]![QuoteDetail]![Me.lstResults2.Column(1).Value]


Any advice, recommendation would help.

Thanks in advance

-Rino
 
L

Larry Linson

The basic premise of Access Reports is that the content comes from a
RecordSource -- table, query, or SQL statement, and that is what "drives"
the detail lines. Occasionally, it is useful to go back and pick up values
from some form to indicate the range of data included in the Report, but
picking up the Report's data itself from a Control on a Form just isn't
consistent with the basic premise.

That said, it's possible to do a lot of things that weren't / aren't the
original intent... but sometimes doing them costs so much time and effort
that it would have been better to try to work within the "Access way."

Larry Linson
Microsoft Access MVP


Rino said:
Greetings,

I hope someone could help me with this problem. What I'm trying to do
is to pass all of the items located in the listbox to a report. The
list box is not based on table/query, but value list (I am not sure if
this is important info or not).

Example:

ListBox
1, PN123, bla bla bla, $123
4, PN223, blah blah, $223
2, PN777, bla blah bla, $333

Report after values have been passed to should look like this:

Quan Part No Description Price
1, PN123 bla bla bla $123
4, PN223 blah blah $223
2, PN777 bla blah bla $333


I've tried with this line to at least pass the value for the quantity
but it gives me an error
=[Forms]![QuoteDetail]![Me.lstResults2.Column(1).Value]


Any advice, recommendation would help.

Thanks in advance

-Rino
 

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

Top