welcomesui@gmail.com
Registered User.
- Local time
- Today, 07:33
- Joined
- May 3, 2011
- Messages
- 32
Hi All,
I am useing below code to concatenate the different fileds, omit if columns contians % as well as dates.
A small bug found in the code, where the total filed [Expr10] of data unable to concatenate in filed as "Name" (query: 1_1)
attached screenshot and sample dbf.
can you help in this regard.
Attached samples files
I am useing below code to concatenate the different fileds, omit if columns contians % as well as dates.
A small bug found in the code, where the total filed [Expr10] of data unable to concatenate in filed as "Name" (query: 1_1)
attached screenshot and sample dbf.
can you help in this regard.
Attached samples files
PHP:
Public Function fConcatValues(ParamArray aFields() As Variant)
Dim i As Long
Dim strReturn As String
For i = LBound(aFields) To UBound(aFields)
If IsDate(aFields(i)) Then 'Screen out text that looks like a date and date fields
'Do nothing
ElseIf InStr(aFields(i) & "", "%") > 0 Then 'Screen out text fields that have a percent sign, does not screen actual number fields that formatted to show percentages
'Do nothing
ElseIf Len(aFields(i) & "") > 0 Then 'Skips Nulls and zero-length string fields
strReturn = strReturn & ", " & aFields(i)
End If
Next i
fConcatValues = Mid(strReturn, 3) 'Trim leading space and comma and return the concatenated value
End Function