Can you join Memo fields on a Continous form

Can you join Memo fields on a continous form??
Jass SainiAsked:
Who is Participating?
 
Gustav BrockConnect With a Mentor CIOCommented:
Make the textbox for the memo unbound.

Then run this code in the OnCurrent event of the form:
Dim rst As DAO.Recordset
Dim strMemo As String
Set rst = Me.RecordsetClone

While Not rst.EOF
    If strMemo <> "" Then
        strMemo = strMemo & vbNewLine
    End If
    strMemo = strMemo & rst!YourMemoField.Value
Wend
Me!txtMemoHeader.Value = strMemo

Set rst = Nothing

Open in new window

/gustav
0
 
Phillip BurtonDirector, Practice Manager and Computing ConsultantCommented:
You can join memo fields in a query which is the Source for continuous forms.
0
 
Jass SainiAuthor Commented:
How?
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
Rey Obrero (Capricorn1)Commented:
what do you mean by joining memo fields?
0
 
Jass SainiAuthor Commented:
Yes for all the records in the query results
0
 
Rey Obrero (Capricorn1)Commented:
do you mean like this

select [memo1] & " " & [memo2]
from tablex
0
 
Jass SainiAuthor Commented:
Sorry Rey,

Maybe I am not clear enough...I have the continous form which if I have the memo field in the detail section..it will need a input in each record...I am trying to do the memo field in the header so it capture the memo for all the records and not each individual one...hope that is clear as to what I want.
0
 
Jass SainiAuthor Commented:
Hello Gustav,

How would the memo be stored??
0
 
Gustav BrockCIOCommented:
The parts of the concatenated memo are stored in the individual records.
The concatenated (joined) memo is for display only.

/gustav
0
 
Jass SainiAuthor Commented:
Ok...I will try it and also where am I suppose to place this event
0
 
Gustav BrockCIOCommented:
In the OnCurrent event.
If you are nitty-gritty, also in the AfterUpdate and Delete events.

/gustav
0
 
Jass SainiAuthor Commented:
That's wierd..it locks up the program
0
 
Gustav BrockCIOCommented:
No, the movenext is missing, sorry:

While Not rst.EOF
    If strMemo <> "" Then
        strMemo = strMemo & vbNewLine
    End If
    strMemo = strMemo & rst!YourMemoField.Value
    rst.MoveNext
Wend

/gustav
0
 
Jass SainiAuthor Commented:
Hello,

I tried this...but it is populating only the first record..In my query I have seventeen records.

Here is what I am using...I want to be able to use one memo box...enter in my comment and it populate the rest of the records.

Private Sub Remarks1_AfterUpdate()
    Dim strMsg As String, strQry As String, strRemark As String
    
    
    If vbYes = MsgBox(strMsg, vbYesNo, "IMPORTANT!!  Confirmation") Then
        strMsg = "Please enter the remark"
        
        strRemark = InputBox(strMsg, "Remark")
        
        If Len(strRemark) > 0 Then
            strQry = "Update Final_Table_AllotQ set UpdatedDate = now(), UpdatedBy = """ & htboLoginName & """, Remarks = Remarks &  '--" & strRemark & "'"
            QuickQry strQry, False
            Me.Requery
        End If
    Else
        MsgBox "Action cancelled."
    End If
    
End Sub

Open in new window

0
 
Gustav BrockCIOCommented:
That's the other way around.
I think you need to rephrase what you are trying to do.

/gustav
0
 
Jass SainiAuthor Commented:
Thanks
0
All Courses

From novice to tech pro — start learning today.