HKFuey
asked on
SQL 2008 add notes field
Hi,
I'm looking for some advice on the data format to use for notes added to a record.
My code adds a date stamp and text and these are displayed in a text box on an Access form.
It looks like this:
23/05/12 Note3 24/05/12 Note2 22/05/12 Note1
How do I make it look like this: -
23/05/12 Note3
24/05/12 Note2
22/05/12 Note1
I tried using & VBCr but this does not seem to work.
I'm looking for some advice on the data format to use for notes added to a record.
My code adds a date stamp and text and these are displayed in a text box on an Access form.
It looks like this:
23/05/12 Note3 24/05/12 Note2 22/05/12 Note1
How do I make it look like this: -
23/05/12 Note3
24/05/12 Note2
22/05/12 Note1
I tried using & VBCr but this does not seem to work.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
try this click event of a button:
Assume field name v = "23/05/12 Note3 24/05/12 Note2 22/05/12 Note1"
Private Sub Command5_Click()
Dim ar() As String ' array to hold substrings
Dim i, j As Integer
ar = Split(v, " ")
i = UBound(ar())
For j = 0 To i - 1 Step 2
Debug.Print ar(j), ar(j + 1)
Next j
End Sub
Assume field name v = "23/05/12 Note3 24/05/12 Note2 22/05/12 Note1"
Private Sub Command5_Click()
Dim ar() As String ' array to hold substrings
Dim i, j As Integer
ar = Split(v, " ")
i = UBound(ar())
For j = 0 To i - 1 Step 2
Debug.Print ar(j), ar(j + 1)
Next j
End Sub
ASKER
I used a combination of Chr(10) or Chr(13) and Enter Key Behavior to New Line. It now works! (I did have Chr(13) or Chr(10) the other way round as well)
Thanks
Thanks
ASKER
But the text box just concatenates them all!