Memo Fields

  • Thread starter Thread starter Justin
  • Start date Start date
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?
 
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.
 
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.
 
Back
Top