OK ghacig . . . . .
Combining the records in the memo field is easy. I spent quite a bit of time looking for a way to help you with the text your appending, but [blue]it appears appended gramatics are not static and thus up to you[/blue]. A shame Access can't help you better with this.
I believe the Memo Field is a part of each record. That is, [blue]its in the same table as the EEG fields of interest[/blue]. If its not, [blue]
you should make it so[/blue], as I'm sure you have no desire to [purple]reconstruct a report again & again[/purple].
The following code will Pack the records line by line, each with a line seperator, each line in the field order given in your example. You can of course change this order, or add additional fields at your discretion. Don't forget to substitute the proper MemoControlName in [purple]
purple[/purple]:
Code:
[blue]Public Sub PackEEG()
Dim rst As DAO.Recordset, Pack As String, DL As String
Set rst = Me.RecordsetClone
DL = vbNewLine & vbNewLine
Do
Pack = Pack & rst!EEGDescription1 & " "
Pack = Pack & rst!EEGPattern & " "
Pack = Pack & rst!EEGFrequency & " "
Pack = Pack & rst!EEGMorphology & " "
Pack = Pack & rst!EEGDescription2 & " "
Pack = Pack & rst!EEGDescription3
rst.MoveNext
If Not rst.EOF Then Pack = Pack & DL
Loop Until rst.EOF
Me![purple][b]YourMemoControlName[/b][/purple] = Pack
DoCmd.RunCommand acCmdSaveRecord
Set rst = Nothing
End Sub
[/blue]
You can call the routine from just about anyway. For testing purposes, make a command button and copy/paste the following code into the [blue]On Click[/blue] event of the button (put the cursor on the event line then click the three elipses):
Code:
[blue]Call PackEEG[/blue]
After you satisified with testing, I strongly advise you [purple]
setup a HotKey combination[/purple] to use instead of the command button. You need this [purple]
for safety[/purple] because its too easy to click the button (besides being inviting) and [purple]
overwrite previously edited Memo Content[/purple] (I'll bet that'll get under your skin!).
[purple]Be aware: No error checking is done in the code for empty recordsets or null fields.[/purple]
See Ya! . . . . . .