Solved

Can you join Memo fields on a Continous form

Posted on 2015-01-12
16
126 Views
Last Modified: 2015-01-14
Can you join Memo fields on a continous form??
0
Comment
Question by:Jass Saini
  • 8
  • 5
  • 2
  • +1
16 Comments
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40545446
You can join memo fields in a query which is the Source for continuous forms.
0
 

Author Comment

by:Jass Saini
ID: 40545454
How?
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 40545513
what do you mean by joining memo fields?
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:Jass Saini
ID: 40545592
Yes for all the records in the query results
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 40545621
do you mean like this

select [memo1] & " " & [memo2]
from tablex
0
 

Author Comment

by:Jass Saini
ID: 40545748
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
 
LVL 49

Accepted Solution

by:
Gustav Brock earned 500 total points
ID: 40546079
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
 

Author Comment

by:Jass Saini
ID: 40546718
Hello Gustav,

How would the memo be stored??
0
 
LVL 49

Expert Comment

by:Gustav Brock
ID: 40546730
The parts of the concatenated memo are stored in the individual records.
The concatenated (joined) memo is for display only.

/gustav
0
 

Author Comment

by:Jass Saini
ID: 40546750
Ok...I will try it and also where am I suppose to place this event
0
 
LVL 49

Expert Comment

by:Gustav Brock
ID: 40546774
In the OnCurrent event.
If you are nitty-gritty, also in the AfterUpdate and Delete events.

/gustav
0
 

Author Comment

by:Jass Saini
ID: 40546890
That's wierd..it locks up the program
0
 
LVL 49

Expert Comment

by:Gustav Brock
ID: 40546897
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
 

Author Comment

by:Jass Saini
ID: 40546927
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
 
LVL 49

Expert Comment

by:Gustav Brock
ID: 40546959
That's the other way around.
I think you need to rephrase what you are trying to do.

/gustav
0
 

Author Closing Comment

by:Jass Saini
ID: 40549147
Thanks
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question