Solved

Can you join Memo fields on a Continous form

Posted on 2015-01-12
16
122 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
Comment Utility
You can join memo fields in a query which is the Source for continuous forms.
0
 

Author Comment

by:Jass Saini
Comment Utility
How?
0
 
LVL 119

Expert Comment

by:Rey Obrero
Comment Utility
what do you mean by joining memo fields?
0
 

Author Comment

by:Jass Saini
Comment Utility
Yes for all the records in the query results
0
 
LVL 119

Expert Comment

by:Rey Obrero
Comment Utility
do you mean like this

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

Author Comment

by:Jass Saini
Comment Utility
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
Comment Utility
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
Comment Utility
Hello Gustav,

How would the memo be stored??
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 49

Expert Comment

by:Gustav Brock
Comment Utility
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
Comment Utility
Ok...I will try it and also where am I suppose to place this event
0
 
LVL 49

Expert Comment

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

/gustav
0
 

Author Comment

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

Expert Comment

by:Gustav Brock
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now