Combine query result to text box

S

Slohcin

I have a query that returns a list from a field named products i.e:
Hammer
Screwdriver
Mallet
Saw
I want to output these as one text string i.e. Hammer, Screwdriver, Mallet,
Saw
with comma, spaces and possibly sorted, how do I do this?
 
D

Douglas J. Steele

It makes no difference if you're using a query or a table.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


DontKnow said:
Hi Doug,

Does this code if it was to be applied to a query vice a table output??

many thanks for your assistance!!

Cheers
 
D

DontKnow

Thanks for the ypdate Doug, but I am getting an error when I utilise an
parametr entry!!

Its OK with just numbers as parameters but if you use say :
forms![myform]![mytextbox] in a QBE, it does create an error which is the
one that I
was getting!!

Is there any work around for this??
 
D

Douglas J. Steele

What's the error you're getting?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


DontKnow said:
Thanks for the ypdate Doug, but I am getting an error when I utilise an
parametr entry!!

Its OK with just numbers as parameters but if you use say :
forms![myform]![mytextbox] in a QBE, it does create an error which is the
one that I
was getting!!

Is there any work around for this??


Douglas J. Steele said:
It makes no difference if you're using a query or a table.
 
D

DontKnow

Hi Doug,

this is the query that I am using:

SELECT aaa.EmployeeID,
fconcatfld("aaa","EmployeeID","coursename","string",[EmployeeID]) AS
coursename
FROM aaa
GROUP BY aaa.EmployeeID;

It consists of 3 fields:
EmployeeID, LicenceID and a coursename. The EmployeeId will be static for a
given person but the LicenceID and course name will reflect the particiar
courses that the person has done. What I want to be able to do is show all
of coursename on a textbox seperated by commas semicolons etc.

I don't seem to be able to get it right for some reason !!

Please help me utilise this tool!!

many thnaks!!

Cheers



Douglas J. Steele said:
What's the error you're getting?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


DontKnow said:
Thanks for the ypdate Doug, but I am getting an error when I utilise an
parametr entry!!

Its OK with just numbers as parameters but if you use say :
forms![myform]![mytextbox] in a QBE, it does create an error which is the
one that I
was getting!!

Is there any work around for this??


Douglas J. Steele said:
It makes no difference if you're using a query or a table.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Hi Doug,

Does this code if it was to be applied to a query vice a table output??

many thanks for your assistance!!

Cheers

:

See whether http://www.mvps.org/access/modules/mdl0008.htm at "The
Access
Web" helps.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


I have a query that returns a list from a field named products i.e:
Hammer
Screwdriver
Mallet
Saw
I want to output these as one text string i.e. Hammer, Screwdriver,
Mallet,
Saw
with comma, spaces and possibly sorted, how do I do this?
 
D

DontKnow

Doug I just worked it out!!

replace "string" with "integer" and it works like a new one!!

(Sorry to bother you)

Douglas J. Steele said:
What's the error you're getting?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


DontKnow said:
Thanks for the ypdate Doug, but I am getting an error when I utilise an
parametr entry!!

Its OK with just numbers as parameters but if you use say :
forms![myform]![mytextbox] in a QBE, it does create an error which is the
one that I
was getting!!

Is there any work around for this??


Douglas J. Steele said:
It makes no difference if you're using a query or a table.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Hi Doug,

Does this code if it was to be applied to a query vice a table output??

many thanks for your assistance!!

Cheers

:

See whether http://www.mvps.org/access/modules/mdl0008.htm at "The
Access
Web" helps.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


I have a query that returns a list from a field named products i.e:
Hammer
Screwdriver
Mallet
Saw
I want to output these as one text string i.e. Hammer, Screwdriver,
Mallet,
Saw
with comma, spaces and possibly sorted, how do I do this?
 
Top