Selecting multiple data from a list box

Results 1 to 2 of 2

Thread: Selecting multiple data from a list box

  1. #1
    Join Date
    Dec 1969

    Default Selecting multiple data from a list box

    Hello,<BR><BR>I&#039;m using ADO.NET to connect to a database, than trying to run a report depending values selected from two listboxes. When the values are hardcoded, it works, but when using the valuemember of<BR>the listboxes, the filedname appears on my selection formula. Can you please help.<BR><BR>Thanks.<BR><BR>Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<BR> &#039;Dim textvalue As String<BR> &#039;Dim chaptervalue As String<BR> &#039;textvalue = "&#039;BE&#039;, &#039;CA&#039;, &#039;FR&#039;, &#039;GE&#039;"<BR> &#039;chaptervalue = "10411"<BR> Dim myaop6report As New aop6report()<BR> Dim myaop6viewer As New AOP6VIEWER()<BR> myaop6report.RecordSelectionFormula = "{} in [" & ListBox2.ValueMember & "] and left({},3) in [" & "&#039;" & ListBox1.ValueMember & "&#039;" & "]"<BR><BR> MsgBox(myaop6report.RecordSelectionFormula)<BR> With myaop6viewer<BR> .CrystalViewer.ReportSource = myaop6report<BR> .Show()<BR> End With<BR> End Sub<BR>

  2. #2
    Join Date
    Dec 1969

    Default What does the debug show?

    You did the MSGBOX to show the string.<BR><BR>So what does it show?<BR><BR>Copy/paste it here.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts