Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now
For Each ctl In Me.Controls If ctl.Tag = "Go" Then If ctl.NAME.Visible Then Select Case ctl.NAME Case "lstCustomer" strField = "Customer" Case "lstCarrier" strField = "Carrier" End Select End If End If If strField <> "" Then strBuildRptWhere = BuildStringLists(ctlPass, strField) End If Next
Function BuildStringLists(ByVal ctlList As Control, ByVal strField As String) As String Dim i As Integer Dim strIn As String 'Build the IN string by looping through the listbox For i = 0 To ctlList.ListCount - 1 If ctlList.Selected(i) Then strIn = strIn & "'" & ctlList.Column(0, i) & "'," End If Next i If strIn <> "" Then BuildStringLists = " AND " & strField & " in (" & Left(strIn, Len(strIn) - 1) & ")" End If End Function
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.