Memo Fields

J

Justin

I'm trying to collect data for a multiple record update and place it into a
memo field. The application steps through a record set compiling the data to
a text box on a form

while not eor
Me![Text1] = Me![Text1] & ", " & Me![RecordData]
Wend

This works fine. When I look at Me![Text1] after the While loop all the
data is correct. I then place this filed into a table using a simple append
query, but when I look in the table the information is truncated with many
non-alpha charaters at the end.

Any thoughts?
 
J

John W. Vinson

This works fine. When I look at Me![Text1] after the While loop all the
data is correct. I then place this filed into a table using a simple append
query, but when I look in the table the information is truncated with many
non-alpha charaters at the end.

Please post the code which runs the append query, and (if it's not created in
the code) the SQL of the query.
 
J

Justin

Here is the code

Me![txtTit] = "GROUP UPDATE - Current" & vbCrLf & vbCrLf
Me![txtTit] = Me![txtTit] & "ACTION: " & Me![txtAct] & vbCrLf
Me![txtTit] = Me![txtTit] & "WORK CENTER: " &
Forms![frmEngGroupUp]![txtWCS] & vbCrLf
Me![txtTit] = Me![txtTit] & "SETTING: " & Forms![frmEngGroupUp]![txtTT]
& vbCrLf
Me![txtTit] = Me![txtTit] & "PARAMETER: " &
Forms![frmEngGroupUp]![txtIns] & vbCrLf
Me![txtTit] = Me![txtTit] & vbCrLf & "USER: " & unVar & vbCrLf & vbCrLf
& "RECIPE LIST: " & vbCrLf

DoCmd.GoToRecord , , acFirst
While IsNull(Me![Text13]) = False
If Me![Check36] = -1 Then
Me![txtTit] = Me![txtTit] & vbCrLf & Nz(Me![Text13], "n/a") & " - "
& Nz(Me![txtProd], "n/a") & " - " & Nz(Me![txtModOn], "n/a")
End If
DoCmd.GoToRecord , , acNext
Wend

Me![txtTit] = vbCrLf & Me![txtTit] & vbCrLf & vbCrLf & "REASON:" &
Me![txtReason] & vbCrLf
Me.Refresh
Rem save group up record
qVar = "INSERT INTO tblMainRecipeC ( Product, ProdUnit, RSTS, RComment )
SELECT 'Group Update' AS Expr1, '" & unVar & "' AS Expr2,
[Forms]![frmRecipeGroup]![txtNow] AS Expr3, [Forms]![frmRecipeGroup]![txtTit]
AS Expr4;"
DoCmd.RunSQL qVar

John W. Vinson said:
This works fine. When I look at Me![Text1] after the While loop all the
data is correct. I then place this filed into a table using a simple append
query, but when I look in the table the information is truncated with many
non-alpha charaters at the end.

Please post the code which runs the append query, and (if it's not created in
the code) the SQL of the query.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top