control bound to form

A

angie

i have a form with a multiselect listbox. i also have a control in my report
that i want it to return the values selected in th multiselect listbox. i
have tried "=[forms]![formname]![listboxname]" but it returns no records.
 
N

NetworkTrade

I could be wrong - but I don't think a multiselect list box will forward
multiple values. It is somewhat misleading. Maybe an MVPer will jump in and
correct this point if I am wrong.

I believe you need to use brute force; have an unbound text box in your
form (which ultimately you will make not visible) and then with each listbox
highlight event use VBA to write the listbox info into the text box by
concatenating it to the text that may already be there (so you don't just
overwrite)...(and managing line breaks might not be possible)..... then
reference this textbox from the Report rather than the listbox itself.........

sorry for the less than comprehensive input.....
 
A

angie

the multiselect listbox sets the criteria for a query. the report is bound to
the query, and not directly related to the form. i just want the report to
print the criteria (values selected in the listbox of my form or the query
criteria) in a textbox and the values to be comma separated. do i have to use
a code for that? and if yes what is the code?

Ο χÏήστης "NetworkTrade" έγγÏαψε:
I could be wrong - but I don't think a multiselect list box will forward
multiple values. It is somewhat misleading. Maybe an MVPer will jump in and
correct this point if I am wrong.

I believe you need to use brute force; have an unbound text box in your
form (which ultimately you will make not visible) and then with each listbox
highlight event use VBA to write the listbox info into the text box by
concatenating it to the text that may already be there (so you don't just
overwrite)...(and managing line breaks might not be possible)..... then
reference this textbox from the Report rather than the listbox itself.........

sorry for the less than comprehensive input.....
--
NTC


angie said:
i have a form with a multiselect listbox. i also have a control in my report
that i want it to return the values selected in th multiselect listbox. i
have tried "=[forms]![formname]![listboxname]" but it returns no records.
 

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