Hi,
I am parsing OpenAgrs as a String From "Form" To Report.
DoCmd.OpenReport "table", acViewPreview, , , acWindowNormal, sTemp
sTemp ( OperArgs) is in a form of string which are "Name" field values selected from Form ListView.
Now, Report side:
Dim args As Variant
Private Sub Report_Open(Cancel As Integer)
Dim temp As Variant
Dim qry As String
If Not IsNull(Me.OpenArgs) Then
temp = Split(Me.OpenArgs, ",")
qry = "SELECT * FROM tblSample WHERE Name = " & "'" & CStr(temp(0)) & "'" & ";" & union & "SELECT * FROM tblSample WHERE Name = " & "'" & CStr(temp(1)) & "'" & ";"
Me.RecordSource = qry
End If
End Sub
I am spliting string parsing from Form Side, to get all Name values.
Query to set recordset is to get all records from table where Name are equal to all selected values from that listview. I have done by this way.
But it only gives me very first selected Name Record.
Help ME!
Thank You,
Darshi.