Report bas on ListBox.

S

sigh

I am wondering if there was any way that I could create a
report base on the items on the listbox of the form?

Here's my statment and it's only works if I select the
item from the list box.

Docmd.OpenReport "ReportName",,,"[ID] = " & Forms!
[frmMain]![listBox].value

But I want whateven items (depand on what the SQL
statment excuted) show on the list box to be show on the
report.

Any help would be very appreciated
 
D

Douglas J. Steele

You're looking for a specific ID: you should be able to display it on your
report.

You mention "items" (plural), though. The syntax you're using won't work if
you have a multi-select listbox. See
http://www.mvps.org/access/forms/frm0007.htm at "The Access Web" for what
you need to do if you're using a multi-select listbox.
 
F

Fons Ponsioen

You indicate that the values you wish to see are based on
a query. Why couldn't you use that query (or the query
reult) to report these values? Possibly in a subreport.
Fons
-----Original Message-----
You're looking for a specific ID: you should be able to display it on your
report.

You mention "items" (plural), though. The syntax you're using won't work if
you have a multi-select listbox. See
http://www.mvps.org/access/forms/frm0007.htm at "The Access Web" for what
you need to do if you're using a multi-select listbox.

--
Doug Steele, Microsoft Access MVP

(No private e-mails, please)



sigh said:
I am wondering if there was any way that I could create a
report base on the items on the listbox of the form?

Here's my statment and it's only works if I select the
item from the list box.

Docmd.OpenReport "ReportName",,,"[ID] = " & Forms!
[frmMain]![listBox].value

But I want whateven items (depand on what the SQL
statment excuted) show on the list box to be show on the
report.

Any help would be very appreciated


.
 

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