Building Text String (1 Viewer)

Fornatian

Dim Person
Local time
Today, 04:00
Joined
Sep 1, 2000
Messages
1,396
Overview - I am designing a maketable query to export a flat table of geospacial data to ArcView. The query info comes from a Table("Sites") which has a 1:M relationship with a 'sub'table("Processes"), which has a field("Process").

My Question:
Is it possible to build a text string which loops through the 'sub'table processes and adds the corresponding process to a text string so that I end up with a string like:

ProcessesUndertaken for Site: welding,ceramics,steel production

so that when I export the data to ArcView a field is there which shows the processes.

I think I would have to do it using a recordset function that returns the string and set my query to unique values only.

Can someone please confirm I am on the right track?
 

Charlie

Registered User.
Local time
Today, 04:00
Joined
Jan 7, 2000
Messages
16
I may be looking at this too simply but could you write a query (programmatically) like this

SELECT Processes FROM Site GROUP BY Processes

this should give you a list of all the different processes in your table and then loop through each row and build your string as below:

strProc = "ProcessesUndertaken for Site: "

.movefirst
do while not .eof
strProc = strProc & !Processes & ", "
.movenext
loop

I've had to do a similar thing and I used this method, it worked but whether this is useful to you...

If you want some more help write back to my email.

C
 

Fornatian

Dim Person
Local time
Today, 04:00
Joined
Sep 1, 2000
Messages
1,396
Thanks Charlie, I had arrived at a similar answer myself using a looping recordset function. Unfortunatly I am going to abandon the idea because this query will be referenced lots of times during a session between applications and I don't think the PC's it will be used on will hack the resource usage.

Thanks anyway.

Happy hunting.

Ian
 

Users who are viewing this thread

Top Bottom