D
deepfreeze007
This is the module I have setup to search through a memo for the character
string "\n" and replacing it with a carriage return and line feed.
It works properly in my test form, but doesn't do anything when added to the
form I want to make the change on. The test form is using 2 unbound text
boxes, and the real form is using a queried table.
Private Sub FixDescriptionButton_Click()
Dim x As Integer
Dim TextToFix, FixedText As String
TestToFix = Me![Item Description]
FixedText = ""
If Len(TextToFix) > 0 Then
For x = 1 To Len(TextToFix)
If Mid(TextToFix, x, 2) = "\n" Then
FixedText = FixedText + vbCrLf '(Chr(13) & Chr(10))
x = x + 1
Else
FixedText = FixedText & Mid(TextToFix, x, 1)
End If
Next x
End If
Me![Fixed Description] = FixedText
End Sub
string "\n" and replacing it with a carriage return and line feed.
It works properly in my test form, but doesn't do anything when added to the
form I want to make the change on. The test form is using 2 unbound text
boxes, and the real form is using a queried table.
Private Sub FixDescriptionButton_Click()
Dim x As Integer
Dim TextToFix, FixedText As String
TestToFix = Me![Item Description]
FixedText = ""
If Len(TextToFix) > 0 Then
For x = 1 To Len(TextToFix)
If Mid(TextToFix, x, 2) = "\n" Then
FixedText = FixedText + vbCrLf '(Chr(13) & Chr(10))
x = x + 1
Else
FixedText = FixedText & Mid(TextToFix, x, 1)
End If
Next x
End If
Me![Fixed Description] = FixedText
End Sub