Summing memo field

I have just started a new job and may not be able to assist until coming weekend.
 
hi PNGBill,
were you able to look into this? sorry to bug you. thank you
 
hi PNGBill, how would we modify your function to requery the field on the first tab once something is picked? i've tried controlname.requery but that hastn worked. please help.
 
Does anyone know how to requery a memo field in the following function?
i've tried controlname.requery but thats hasnt worked for me successfully. please advise.

Public Function fncTaskComments(ProjectID As Long) As String
On Error GoTo fncTaskComments_Error
Dim rst As DAO.Recordset
Dim strOutput As String

Set rst = CurrentDb.OpenRecordset("SELECT Projects.ID, Tasks.comments AS ProjectComments " & _
"FROM Projects LEFT JOIN Tasks ON Projects.ID = Tasks.Project " & _
"WHERE (((Projects.ID)=" & ProjectID & "));", dbOpenDynaset)

If Not (rst.BOF And rst.EOF) Then 'test for records
Do While Not rst.EOF
strOutput = strOutput & rst("ProjectComments") & ", "
rst.MoveNext
Loop
strOutput = Left(strOutput, Len(strOutput) - 2) 'remove last comma
fncTaskComments = strOutput
Else
fncTaskComments = "No Comments"
End If
On Error GoTo 0
Exit Function
 

Users who are viewing this thread

Back
Top Bottom