I have a module that works with a query. Im still learning how to build a module. I have everything working; except, id like my "f1" results not to string. can some one point me in a direction?
Code:
Public Function fnConcat(dteValue As Variant) As Variant
Dim rs As DAO.Recordset
Dim strSQL As String
Dim strResult As String
dteValue = Nz(dteValue, 0)
strSQL = "SELECT f1 FROM qryARROW WHERE #" & Format(dteValue, "mm/dd/yyyy") & _
"# Between content_S_DATE And END_DATE"
Set rs = CurrentDb.OpenRecordset(strSQL, dbOpenSnapshot)
With rs
If Not (.BOF And .EOF) Then
.MoveFirst
End If
While Not .EOF
strResult = strResult & !f1 & ", "
.MoveNext
Wend
.Close
End With
Set rs = Nothing
If Len(strResult) > 0 Then
strResult = Left(strResult, Len(strResult) - 2)
fnConcat = strResult
End If
End Function