You have to put a second Loop inside the first, something like this:
Dim StrAgent
StrAgent = rstemp("TheIdOfYourAget"),
or fname & lname if unique
DO UNTIL rstemp.eof
' put fields into variables
pid=rstemp("PropertyID")
fname=rstemp("FirstName")
lname=rstemp("LastName")
price=rstemp("price")
headline=rstemp("Headline"
)
city=rstemp("City")
tfile.WriteLine("
")
tfile.WriteLine("" & cellstart & pid & "")
Do UNTIL StrAgent = rstemp("TheIdOfYourAget"), or fname & lname if unique
tfile.WriteLine("" & cellstart & fname & lname & "")
StrAgent = rstemp("TheIdOfYourAget"), or fname & lname if unique
rstemp.movenext
If rstemp.eof Then exit loop
LOOP
tfile.WriteLine("" & cellstart & price & "")
tfile.WriteLine("" & cellstart & headline & "")
tfile.WriteLine("" & cellstart & city & "")
tfile.WriteLine(""
)
LOOP
or
Dim StrAgent
StrAgent = rstemp("TheIdOfYourAget"),
or fname & lname if unique
DO UNTIL rstemp.eof
' put fields into variables
pid=rstemp("PropertyID")
fname=rstemp("FirstName")
lname=rstemp("LastName")
price=rstemp("price")
headline=rstemp("Headline"
)
city=rstemp("City")
tfile.WriteLine("
")
tfile.WriteLine("" & cellstart & pid & "")
tfile.Write("" & cellstart)
Do UNTIL StrAgent = rstemp("TheIdOfYourAget"), or fname & lname if unique
tfile.Write(fname & lname)
tfile.Write("; ") 'Or the separated value you want
StrAgent = rstemp("TheIdOfYourAget"), or fname & lname if unique
rstemp.movenext
If rstemp.eof Then exit loop
LOOP
tfile.WriteLine("")
tfile.WriteLine("" & cellstart & price & "")
tfile.WriteLine("" & cellstart & headline & "")
tfile.WriteLine("" & cellstart & city & "")
tfile.WriteLine(""
)
LOOP
or you could use a var inside loop to create
Name
Name
Name
I hope this will help.
Bye.