Report Question

  • Thread starter Thread starter Randy Fritz
  • Start date Start date
R

Randy Fritz

Hey NG

I have a table that I am trying to print out in a report. This is an
activity log of changes made within a form. I have coded the form to add a
record to the table. The table has 2 Fields -TimeOfChange (which is a date
field) and ChangesMade (which is a memo field). I have coded the form in the
Form BeforeUpdate Event.

dim db as dao.database
dim rs as dao.recordset
set db = currentdb
set rs = db.openrecordset("My Table",dbOpenDynaset)
with rs
..addnew
!TimeOfChange = Time()
!ChangesMade = "Date: " & Date & Chr(9) & _
"Field: " & Me!Control1.Name & Chr(13) & _
"Original Value = " & Me!Control1 & Chr(13) & _
"Changed Value = Null"
..Update
end with

Now when I debug print my string it looks great but in the table it has the
Character Control for my tabs and line feeds. When I created my report I
placed a text box on my detail section and set its control to ChangesMade
and it can Grow to fit but it doesn't print out as tabs and linefeeds it
still shows the Character Controls - How can I get my linefeeds and tabs to
show in a report as it shows in the debug window?

Randy
 
Randy,

You need both Chr(13) & Chr(10) and in that order for a carriage return/line
feed. If
you have only one you will see square boxes in your text.
Or you can use the vba constant vbCrLf.

HTH,
Josh
 
Back
Top