infomania
Programmer
- Oct 27, 2002
- 148
I would like have a function to convert a user entered, comma separated, text string to a proper text string to be used in a WHERE clause.
Example:
Dim strInput, strConvInput, strSQL As String
strInput = Me.BoLInput ' user entered string
' user string looks like: 123a, 134D, 115,123
' user could enter spaces after comma
' use function to convert strInput 'to '123a','134D','115','123'
strConvInput = ConvFunct(strBoLInput)
strSQL = "UPDATE tblInbound SET XferCustID = " & Me.XferCustID
strSQL = strSQL + " WHERE BoL_IN IN (" & strConvInput & ")"
DoCmd.RunSQL strSQL
Any ideas?
Example:
Dim strInput, strConvInput, strSQL As String
strInput = Me.BoLInput ' user entered string
' user string looks like: 123a, 134D, 115,123
' user could enter spaces after comma
' use function to convert strInput 'to '123a','134D','115','123'
strConvInput = ConvFunct(strBoLInput)
strSQL = "UPDATE tblInbound SET XferCustID = " & Me.XferCustID
strSQL = strSQL + " WHERE BoL_IN IN (" & strConvInput & ")"
DoCmd.RunSQL strSQL
Any ideas?