Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export Formatting

Status
Not open for further replies.

sstump

Technical User
Oct 29, 2003
56
US
I'm trying to export a table out to more of a string that is used as a query within another program. Rather then taking all day to explain it let me post what I'm looking for.

This is what I start with:
'Trouble Ticket ID:' = "TT-000000060457" OR
'Trouble Ticket ID:' = "TT-000000060621" OR
'Trouble Ticket ID:' = "TT-000000060600" OR
'Trouble Ticket ID:' = "TT-000000060756" OR

This is what I need to end with (one line):
'Trouble Ticket ID:' = "TT-000000060457" OR 'Trouble Ticket ID:' = "TT-000000060621" OR 'Trouble Ticket ID:' = "TT-000000060600" OR 'Trouble Ticket ID:' = "TT-000000060756"

Except on a much larger scale (roughly in excess of 10000 lines).

Any suggestions?
 
You only supply the data that you start off with . . .
What do you have there? A recordset?

I was standing in the park, wondering why frisbees got bigger as they came closer... then it hit me!
 
Yes...it starts out as a CSV file that I import into Access with the "TT-000000060457" information, I'm adding the additional information and then I need to string it out to plug it back in where I need it.

I know it's got to be a fairly simple process. Just can't figure it out.
 
Say output is the string that you build up to use to export, then would this work ?

For i = 0 to rs.RecordCount - 1
output = output & rs.fields(0) & " OR "
next i

'Take out the last OR
output = left(output,len(output) - 4)

Or am I missing something?
[flowerface]

I was standing in the park, wondering why frisbees got bigger as they came closer... then it hit me!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top