Text from List Box in report header

N

Nancy

I have a text field with control source =report.sOpenArgs in my report header
to display items selected in the list box lbdefendant, The code below returns
the value stored rather than the text, how do I get the text?

Dim sOpenArgs as String
Dim stDocName as String

stDocName = "rptMasterDepositions"

For Each varItem In Me.lbDefendant.ItemsSelected
sOpenArgs = sOpenArgs & ",' " & Me.lbDefendant.ItemData(varItem) &
"'"
Next varItem

DoCmd.OpenReport stDocName, acViewPreview, ,,, , sOpenArgs

I have a text field with control source =report.sOpenArgs in my report
header to display items selected in the list box lbdefendant, The code below
returns the value stored rather than the text, how do I get the text?
 

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