G Guest Jul 28, 2004 #2 Try this: Dim strwhere As Variant Dim varItem As Variant If Me!Your List Box Name.ItemsSelected.Count = 0 Then Exit Sub For Each varItem In Me!Your List Box Name.ItemsSelected strwhere = strwhere & "'" & Me!Your List Box Name.Column(0, varItem) & "'" & "," Next varItem strwhere = Left$(strwhere, Len(strwhere) - 1) strwhere = "[Auto_Box_ID] IN (" & strwhere & ")" DoCmd.OpenForm FormName:="frmIssue", wherecondition:=strwhere
Try this: Dim strwhere As Variant Dim varItem As Variant If Me!Your List Box Name.ItemsSelected.Count = 0 Then Exit Sub For Each varItem In Me!Your List Box Name.ItemsSelected strwhere = strwhere & "'" & Me!Your List Box Name.Column(0, varItem) & "'" & "," Next varItem strwhere = Left$(strwhere, Len(strwhere) - 1) strwhere = "[Auto_Box_ID] IN (" & strwhere & ")" DoCmd.OpenForm FormName:="frmIssue", wherecondition:=strwhere
V Van T. Dinh Jul 29, 2004 #3 Not sure from your short question without details of your set-up but I guess you need the technique described in The Access Web article: http://www.mvps.org/access/forms/frm0007.htm
Not sure from your short question without details of your set-up but I guess you need the technique described in The Access Web article: http://www.mvps.org/access/forms/frm0007.htm