Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy listbox content into report header 1

Status
Not open for further replies.

ZOR

Technical User
Jan 30, 2002
2,963
GB
I have a listbox on a form which gets user selected words added with additem. Basically they are words the user enters to select records - a form of keywords. The words are held in a listbox to allow the user to go back and see records selected by these words. However the user would like to list the stored words in a report header. Can it be done? Thanks
 
Howdy ZOR . . .

On the premise of a [blue]packed string[/blue], If the [blue]rowsource[/blue] is a table name, query name, or SQL statement try this:
Code:
[blue]Private Function FilterItems()
   Dim LBx As ListBox, idx As Integer
   
   Set LBx = Me!ListboxName
   For idx = 0 To LBx.ListCount - 1
      If Pack <> "" Then
         Pack = Pack & ", " & LBx.Column(0)
      Else
         Pack = LBx.Column(0)
      End If
   Next
   
   FilterItems = Pack
   Set LBx = Nothing
   
End Function[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
 
Many thanks, perfect!! Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top