B
Bob Barnes
I Posted This in "General Question:...but no replies..Thanks for any
assistance here.
Thanks to Allen Browne for a code example in using a List Box.
Part of the code included...
strWhere = strWhere & strDelim & .ItemData(varItem) & strDelim & ","
No problem building that from multiple selections from the List Box.
What I need is...from...
WHERE (((ABilling.MemStatus)=[Forms]![New Members]![AMemLists]) AND
((Left([LastName],1))=[Forms]![New Members]![ForBill]))....
The "AMemLists" is a Member Year (IE = 2007). I need to build multiple...
((Left([LastName],1))=[Forms]![New Members]![ForBill])), where it would be
like...
Left([LastName],1)="A" Or Left([LastName],1)="B" Or
Left([LastName],1)="C"...etc.
Back to Allen's example...
Remove trailing comma. Add field name, IN operator, and brackets.
lngLen = Len(strWhere) - 1
If lngLen > 0 Then
strWhere = "[CategoryID] IN (" & Left$(strWhere, lngLen) & ")"
lngLen = Len(strDescrip) - 2
If lngLen > 0 Then
strDescrip = "Categories: " & Left$(strDescrip, lngLen)
End If
End If
....where I open the Report with...
DoCmd.OpenReport strDoc, acViewPreview, WhereCondition:=strWhere,
OpenArgs:=strDescrip
TIA - Bob
assistance here.
Thanks to Allen Browne for a code example in using a List Box.
Part of the code included...
strWhere = strWhere & strDelim & .ItemData(varItem) & strDelim & ","
No problem building that from multiple selections from the List Box.
What I need is...from...
WHERE (((ABilling.MemStatus)=[Forms]![New Members]![AMemLists]) AND
((Left([LastName],1))=[Forms]![New Members]![ForBill]))....
The "AMemLists" is a Member Year (IE = 2007). I need to build multiple...
((Left([LastName],1))=[Forms]![New Members]![ForBill])), where it would be
like...
Left([LastName],1)="A" Or Left([LastName],1)="B" Or
Left([LastName],1)="C"...etc.
Back to Allen's example...
Remove trailing comma. Add field name, IN operator, and brackets.
lngLen = Len(strWhere) - 1
If lngLen > 0 Then
strWhere = "[CategoryID] IN (" & Left$(strWhere, lngLen) & ")"
lngLen = Len(strDescrip) - 2
If lngLen > 0 Then
strDescrip = "Categories: " & Left$(strDescrip, lngLen)
End If
End If
....where I open the Report with...
DoCmd.OpenReport strDoc, acViewPreview, WhereCondition:=strWhere,
OpenArgs:=strDescrip
TIA - Bob