how to use the split function?

yepwingtim

Registered User.
Local time
Yesterday, 19:00
Joined
Jun 6, 2008
Messages
126
Hi guys i don't know any vb coding at all
I made a query to concatenate a doctor's list
Now the QUERY shows all in a single line like
John Smith, 199 Maple Road, New York, Flushing 11379

I need it to use THAT query show like this
John Smith
199 Maple Road
New York, Flushing 11379

I believe i need to use the split function can anyone help? Thanks =)

Danielle
________
Buy no2 vaporizer
 
Last edited:
Actually, why not just modify the query to include Chr(13) & Chr(10) at the points where you want the new lines?
 
HI Bob, thanks for the fast reply, I actually have two forms

First form I have already made. It shows a list of the doctor's in a drop-down box in 1 whole row.

ie John Smith, 199 Maple Rd, New York, Flushing 11379

The Second form uses that query from the First Form.
If I do use the functions you mentioned, It would break the lines from First form too. I think =D
________
Zoloft settlements
 
Last edited:
Why not modify the other query then to have both fields, the one concatenated for the first form and the other concatenated for the second?
 
You see the first form I have fetches the data from a doctor's table

Referring Doctor: John Smith, 199 Maple Rd, New York, Flushing 11379

The second form fetches the field Referring Doctor from the first form

I'm kind of confused myself on how to do this sorry
________
Honda OSM history
 
Last edited:
You see the first form I have fetches the data from a doctor's table

Referring Doctor: John Smith, 199 Maple Rd, New York, Flushing 11379

The second form fetches the field Referring Doctor from the first form

I'm kind of confused myself on how to do this sorry

in your query, create two concatenated fields. One, which is like your current one, and one with the same fields concatenated but with the Chr(13) & Chr(10) inserted for line breaks. Then use the first field in the first form and the second field in the second form.
 
Private Sub Referring_Doctor_BeforeUpdate(Cancel As Integer)
Dim a

a = Split([Patsums].[Referring_Doctor], ",")
Document.write (a(0) & Chr(13) & Chr(10))
Document.write (a(1))
End Sub

what am i doing wrong here?
________
MERCEDES-BENZ W208 HISTORY
 
Last edited:
Hi Bob it doesn't work on query unfortunately
The doctor's table is not relational to the patient's history table
(stupid of me)
Just think it as a field where i typed
Joe Dirty, 1900 maple Rd, New York, Flushing 11379

and now i want to split it up
________
MARIJUANA NEWS
 
Last edited:
If you just want to see it in a "label" format, you could do it like this:

Replace([Referring_Doctor],", ",Chr(13) & Chr(10))

This replaces each comma and space with a carriage return and line feed.

Chris
 

Users who are viewing this thread

Back
Top Bottom