I am making a function in a class to return 2 fields from a table in SQL 7 this is the code
Public Function GetReCurChgs(strCustno As String) As String
Dim rsTemp As ADODB.Recordset
Set rsTemp = New ADODB.Recordset
rsTemp.Open "select chg_desc,chg_amt from rcufil where
acct ='" & strCustno & "'", _
CN, adOpenStatic, adLockReadOnly
Do While Not rsTemp.EOF
GetReCurChgs = Trim(GetReCurChgs) & vbNewLine
rsTemp.MoveNext
Loop
rsTemp.Close
Set rsTemp = Nothing
End Function
the trouble is all that returns is blanks in quotes (actually squares show in the debugger) I know the field names are right and the data is there... any suggestions?
Public Function GetReCurChgs(strCustno As String) As String
Dim rsTemp As ADODB.Recordset
Set rsTemp = New ADODB.Recordset
rsTemp.Open "select chg_desc,chg_amt from rcufil where
acct ='" & strCustno & "'", _
CN, adOpenStatic, adLockReadOnly
Do While Not rsTemp.EOF
GetReCurChgs = Trim(GetReCurChgs) & vbNewLine
rsTemp.MoveNext
Loop
rsTemp.Close
Set rsTemp = Nothing
End Function
the trouble is all that returns is blanks in quotes (actually squares show in the debugger) I know the field names are right and the data is there... any suggestions?