Display the output from a query in a textbox

D

DontKnow

Hi Guys,

I wanted to display the output from a single field generated from a query in
a textbox. For instance the single field is called "Course" and the output
is typically:
va
vt
be
as
tg etc

I wanted the output to look like this:

va vt be as tg etc

Is this possible

many thnaks in advance!!

Cheers
 
J

John Spencer

Quoting Duane Hookom

I use a generic Concatenate() function. The code is listed below with both ADO
and DAO. There are comments regarding which lines to comment or uncomment
based on which library you prefer. Access 97 is mostly DAO while the default
for 2000 and newer is ADO.

See:
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane

Be sure to copy the function into your database and be sure to modify as
appropriate to make it work with your database. See Duane's comments in the
code for the modifications that MAY be needed.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
 
D

DontKnow

Many thanks John, I'll try thattomorrow at work!!

Its meant for an excel spreadsheet that I've imported and it appears tyhat
only the forms control source fields are displayed. I've tried a couple of
text boxes with infformation that should be displayed normally by a text box
but it doesn't. I hope that this should work from a query!!

Many thansk again!!
 
D

DontKnow

Hi John,

In your example you have a query based on a table, what changes would be
required if the query was based on another query??

Os should I just poor the results of the query into a table??

Is there a better way I don't know??

Cheers in advance!!
 
J

John Spencer

You can use a query in place of the table - IF the query you are using does
NOT have any parameters. If it does have parametersa, I think it will cause
an error.

Experiment and see what you learn.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
 
D

DontKnow

Yes you are right!!

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

Is there any work around for this??

Cheers,
thamnks for your help John!!
 
J

John Spencer

Perhaps, but I can't tell what it is.

Post the SQL of the query you want to use.

Post the Concatenate expression you are trying to use.



John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
Yes you are right!!

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

Is there any work around for this??

Cheers,
thamnks for your help John!!

John Spencer said:
You can use a query in place of the table - IF the query you are using does
NOT have any parameters. If it does have parametersa, I think it will cause
an error.

Experiment and see what you learn.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
 
D

DontKnow

Hi John the SQKL of the query is:

SELECT EmployeeTraining.EmployeeID, EmployeeTraining.LicenceID,
concatenate("select [Course Name] from CourseTraining") AS coursename
FROM EmployeeTraining
WHERE (((EmployeeTraining.EmployeeID)=[forms]![Report Selector
Form]![text12]) AND ((EmployeeTraining.LicenceID)=1 Or
(EmployeeTraining.LicenceID)=2 Or (EmployeeTraining.LicenceID)=3 Or
(EmployeeTraining.LicenceID)=4 Or (EmployeeTraining.LicenceID)=5 Or
(EmployeeTraining.LicenceID)=6 Or (EmployeeTraining.LicenceID)=7));

The expression I am trying to use is:

coursename: concatenate("select [Course Name] from CourseTraining")

I have 2 tables, one is called CourseTraining, attributes: CourseTrainingID,
Course Name, Notes

2nd Table is a link Table, with attributes: EmployeeID, LicenceID,
Datecompleted, ...

My difficulty is that I am trying to get the [Course Name] from the
CourseTraining Table when I have an EmployeeID and LicenceID from the LInk
Table EmployeeTraing and i don't know how to do this via the QBE to provide a
horizontal output vice a vertical one from the usual QBE query??

I hope this helps??

Thnaks agian John!!



John Spencer said:
Perhaps, but I can't tell what it is.

Post the SQL of the query you want to use.

Post the Concatenate expression you are trying to use.



John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
Yes you are right!!

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

Is there any work around for this??

Cheers,
thamnks for your help John!!

John Spencer said:
You can use a query in place of the table - IF the query you are using does
NOT have any parameters. If it does have parametersa, I think it will cause
an error.

Experiment and see what you learn.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

DontKnow wrote:
Hi John,

In your example you have a query based on a table, what changes would be
required if the query was based on another query??

Os should I just poor the results of the query into a table??

Is there a better way I don't know??

Cheers in advance!!

:

Quoting Duane Hookom

I use a generic Concatenate() function. The code is listed below with both ADO
and DAO. There are comments regarding which lines to comment or uncomment
based on which library you prefer. Access 97 is mostly DAO while the default
for 2000 and newer is ADO.

See:
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane

Be sure to copy the function into your database and be sure to modify as
appropriate to make it work with your database. See Duane's comments in the
code for the modifications that MAY be needed.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

DontKnow wrote:
Hi Guys,

I wanted to display the output from a single field generated from a query in
a textbox. For instance the single field is called "Course" and the output
is typically:
va
vt
be
as
tg etc

I wanted the output to look like this:

va vt be as tg etc

Is this possible

many thnaks in advance!!

Cheers
 
J

John Spencer

I think you want to use something along the lines of
SELECT EmployeeTraining.EmployeeID
, EmployeeTraining.LicenceID,
concatenate("select [Course Name] from CourseTraining") AS coursename
FROM EmployeeTraining
WHERE EmployeeTraining.EmployeeID=
[forms]![Report Selector Form]![text12])
AND EmployeeTraining.LicenceID in (1,2,3,4,5,6,7)

PERHAPS the expression you are looking for would be.
Concatenate(
"SELECT [Course Name]
FROM [CourseTraining] INNER JOIN [Link Table]
ON [CourseTraining].CourseTrainingID = [Link Table].CourseTrainingID
WHERE [Link Table].EmployeeID=""" &
EmployeeTraining.EmployeeID & """",",")

That is all one line. I have just formatted it for readability.


You did say you can get the data you want horizontally and have a query for
that. May I suggest you post that query? That may give me a better idea of
your structure.


John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
Hi John the SQKL of the query is:

SELECT EmployeeTraining.EmployeeID, EmployeeTraining.LicenceID,
concatenate("select [Course Name] from CourseTraining") AS coursename
FROM EmployeeTraining
WHERE (((EmployeeTraining.EmployeeID)=[forms]![Report Selector
Form]![text12]) AND ((EmployeeTraining.LicenceID)=1 Or
(EmployeeTraining.LicenceID)=2 Or (EmployeeTraining.LicenceID)=3 Or
(EmployeeTraining.LicenceID)=4 Or (EmployeeTraining.LicenceID)=5 Or
(EmployeeTraining.LicenceID)=6 Or (EmployeeTraining.LicenceID)=7));

The expression I am trying to use is:

coursename: concatenate("select [Course Name] from CourseTraining")

I have 2 tables, one is called CourseTraining, attributes: CourseTrainingID,
Course Name, Notes

2nd Table is a link Table, with attributes: EmployeeID, LicenceID,
Datecompleted, ...

My difficulty is that I am trying to get the [Course Name] from the
CourseTraining Table when I have an EmployeeID and LicenceID from the LInk
Table EmployeeTraing and i don't know how to do this via the QBE to provide a
horizontal output vice a vertical one from the usual QBE query??

I hope this helps??

Thnaks agian John!!



John Spencer said:
Perhaps, but I can't tell what it is.

Post the SQL of the query you want to use.

Post the Concatenate expression you are trying to use.



John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
Yes you are right!!

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

Is there any work around for this??

Cheers,
thamnks for your help John!!

:

You can use a query in place of the table - IF the query you are using does
NOT have any parameters. If it does have parametersa, I think it will cause
an error.

Experiment and see what you learn.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

DontKnow wrote:
Hi John,

In your example you have a query based on a table, what changes would be
required if the query was based on another query??

Os should I just poor the results of the query into a table??

Is there a better way I don't know??

Cheers in advance!!

:

Quoting Duane Hookom

I use a generic Concatenate() function. The code is listed below with both ADO
and DAO. There are comments regarding which lines to comment or uncomment
based on which library you prefer. Access 97 is mostly DAO while the default
for 2000 and newer is ADO.

See:
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane

Be sure to copy the function into your database and be sure to modify as
appropriate to make it work with your database. See Duane's comments in the
code for the modifications that MAY be needed.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

DontKnow wrote:
Hi Guys,

I wanted to display the output from a single field generated from a query in
a textbox. For instance the single field is called "Course" and the output
is typically:
va
vt
be
as
tg etc

I wanted the output to look like this:

va vt be as tg etc

Is this possible

many thnaks in advance!!

Cheers
 
D

DontKnow

Hi John,

Here is the SQL view of my query:

SELECT EmployeeTraining.EmployeeID, EmployeeTraining.LicenceID,
Concatenate("SELECT [Course Name] FROM [CourseTraining] INNER JOIN
[EmployeeTraining] ON [CourseTraining].CourseTrainingID =
[EmployeeTraining].LicenceID WHERE [EmployeeTraining].EmployeeID= " &
[EmployeeTraining].[EmployeeID] & "",",") AS coursename
FROM EmployeeTraining
WHERE (((EmployeeTraining.EmployeeID)=49) AND ((EmployeeTraining.LicenceID)
In (1,2,3,4,5,6,7)));

I am actually getting the write values as a result of the query above but I
am also getting 3 records returned where I only need 1??

Any assistance greatly appreciated!!

I have been pulling my hair out on this one!!
Quite frustrating!

Cheers

John Spencer said:
I think you want to use something along the lines of
SELECT EmployeeTraining.EmployeeID
, EmployeeTraining.LicenceID,
concatenate("select [Course Name] from CourseTraining") AS coursename
FROM EmployeeTraining
WHERE EmployeeTraining.EmployeeID=
[forms]![Report Selector Form]![text12])
AND EmployeeTraining.LicenceID in (1,2,3,4,5,6,7)

PERHAPS the expression you are looking for would be.
Concatenate(
"SELECT [Course Name]
FROM [CourseTraining] INNER JOIN [Link Table]
ON [CourseTraining].CourseTrainingID = [Link Table].CourseTrainingID
WHERE [Link Table].EmployeeID=""" &
EmployeeTraining.EmployeeID & """",",")

That is all one line. I have just formatted it for readability.


You did say you can get the data you want horizontally and have a query for
that. May I suggest you post that query? That may give me a better idea of
your structure.


John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
Hi John the SQKL of the query is:

SELECT EmployeeTraining.EmployeeID, EmployeeTraining.LicenceID,
concatenate("select [Course Name] from CourseTraining") AS coursename
FROM EmployeeTraining
WHERE (((EmployeeTraining.EmployeeID)=[forms]![Report Selector
Form]![text12]) AND ((EmployeeTraining.LicenceID)=1 Or
(EmployeeTraining.LicenceID)=2 Or (EmployeeTraining.LicenceID)=3 Or
(EmployeeTraining.LicenceID)=4 Or (EmployeeTraining.LicenceID)=5 Or
(EmployeeTraining.LicenceID)=6 Or (EmployeeTraining.LicenceID)=7));

The expression I am trying to use is:

coursename: concatenate("select [Course Name] from CourseTraining")

I have 2 tables, one is called CourseTraining, attributes: CourseTrainingID,
Course Name, Notes

2nd Table is a link Table, with attributes: EmployeeID, LicenceID,
Datecompleted, ...

My difficulty is that I am trying to get the [Course Name] from the
CourseTraining Table when I have an EmployeeID and LicenceID from the LInk
Table EmployeeTraing and i don't know how to do this via the QBE to provide a
horizontal output vice a vertical one from the usual QBE query??

I hope this helps??

Thnaks agian John!!



John Spencer said:
Perhaps, but I can't tell what it is.

Post the SQL of the query you want to use.

Post the Concatenate expression you are trying to use.



John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

DontKnow wrote:
Yes you are right!!

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

Is there any work around for this??

Cheers,
thamnks for your help John!!

:

You can use a query in place of the table - IF the query you are using does
NOT have any parameters. If it does have parametersa, I think it will cause
an error.

Experiment and see what you learn.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

DontKnow wrote:
Hi John,

In your example you have a query based on a table, what changes would be
required if the query was based on another query??

Os should I just poor the results of the query into a table??

Is there a better way I don't know??

Cheers in advance!!

:

Quoting Duane Hookom

I use a generic Concatenate() function. The code is listed below with both ADO
and DAO. There are comments regarding which lines to comment or uncomment
based on which library you prefer. Access 97 is mostly DAO while the default
for 2000 and newer is ADO.

See:
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane

Be sure to copy the function into your database and be sure to modify as
appropriate to make it work with your database. See Duane's comments in the
code for the modifications that MAY be needed.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

DontKnow wrote:
Hi Guys,

I wanted to display the output from a single field generated from a query in
a textbox. For instance the single field is called "Course" and the output
is typically:
va
vt
be
as
tg etc

I wanted the output to look like this:

va vt be as tg etc

Is this possible

many thnaks in advance!!

Cheers
 
J

John Spencer

Using the DISTINCT keyword may give you the results you want, although it will
not be the most efficient way of doing this.

SELECT DISTINCT EmployeeTraining.EmployeeID
, EmployeeTraining.LicenceID
, Concatenate("SELECT [Course Name] FROM [CourseTraining] INNER JOIN
[EmployeeTraining] ON [CourseTraining].CourseTrainingID =
[EmployeeTraining].LicenceID WHERE [EmployeeTraining].EmployeeID= " &
[EmployeeTraining].[EmployeeID] & "",",") AS coursename
FROM EmployeeTraining
WHERE (((EmployeeTraining.EmployeeID)=49) AND ((EmployeeTraining.LicenceID)
In (1,2,3,4,5,6,7)));

I don't know your data structure. There may be a more efficient way to do
this and there may not be. If the above works for you, then use it. If it is
too slow, post back and tell us some thing about your tables

EmployeeTraining - what kind of data does this hold
CourseTraining - what kind of data does this hold

This query with a nested subquery in the FROM clause should give you the
results you want AS LONG AS an employee has only one LicenceID.

SELECT ET.*
,Concatenate("SELECT [Course Name] FROM [CourseTraining] INNER JOIN
[EmployeeTraining] ON [CourseTraining].CourseTrainingID =
[EmployeeTraining].LicenceID WHERE [EmployeeTraining].EmployeeID= " &
[EmployeeID] & "",",") AS coursename
FROM (SELECT DISTINCT EmployeeID, LicenceID FROM EmployeeTraining WHERE
LicenseID in (1,2,3,4,5,6,7)) as ET
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
Hi John,

Here is the SQL view of my query:

SELECT EmployeeTraining.EmployeeID, EmployeeTraining.LicenceID,
Concatenate("SELECT [Course Name] FROM [CourseTraining] INNER JOIN
[EmployeeTraining] ON [CourseTraining].CourseTrainingID =
[EmployeeTraining].LicenceID WHERE [EmployeeTraining].EmployeeID= " &
[EmployeeTraining].[EmployeeID] & "",",") AS coursename
FROM EmployeeTraining
WHERE (((EmployeeTraining.EmployeeID)=49) AND ((EmployeeTraining.LicenceID)
In (1,2,3,4,5,6,7)));

I am actually getting the write values as a result of the query above but I
am also getting 3 records returned where I only need 1??

Any assistance greatly appreciated!!

I have been pulling my hair out on this one!!
Quite frustrating!

Cheers

John Spencer said:
I think you want to use something along the lines of
SELECT EmployeeTraining.EmployeeID
, EmployeeTraining.LicenceID,
concatenate("select [Course Name] from CourseTraining") AS coursename
FROM EmployeeTraining
WHERE EmployeeTraining.EmployeeID=
[forms]![Report Selector Form]![text12])
AND EmployeeTraining.LicenceID in (1,2,3,4,5,6,7)

PERHAPS the expression you are looking for would be.
Concatenate(
"SELECT [Course Name]
FROM [CourseTraining] INNER JOIN [Link Table]
ON [CourseTraining].CourseTrainingID = [Link Table].CourseTrainingID
WHERE [Link Table].EmployeeID=""" &
EmployeeTraining.EmployeeID & """",",")

That is all one line. I have just formatted it for readability.


You did say you can get the data you want horizontally and have a query for
that. May I suggest you post that query? That may give me a better idea of
your structure.


John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
Hi John the SQKL of the query is:

SELECT EmployeeTraining.EmployeeID, EmployeeTraining.LicenceID,
concatenate("select [Course Name] from CourseTraining") AS coursename
FROM EmployeeTraining
WHERE (((EmployeeTraining.EmployeeID)=[forms]![Report Selector
Form]![text12]) AND ((EmployeeTraining.LicenceID)=1 Or
(EmployeeTraining.LicenceID)=2 Or (EmployeeTraining.LicenceID)=3 Or
(EmployeeTraining.LicenceID)=4 Or (EmployeeTraining.LicenceID)=5 Or
(EmployeeTraining.LicenceID)=6 Or (EmployeeTraining.LicenceID)=7));

The expression I am trying to use is:

coursename: concatenate("select [Course Name] from CourseTraining")

I have 2 tables, one is called CourseTraining, attributes: CourseTrainingID,
Course Name, Notes

2nd Table is a link Table, with attributes: EmployeeID, LicenceID,
Datecompleted, ...

My difficulty is that I am trying to get the [Course Name] from the
CourseTraining Table when I have an EmployeeID and LicenceID from the LInk
Table EmployeeTraing and i don't know how to do this via the QBE to provide a
horizontal output vice a vertical one from the usual QBE query??

I hope this helps??

Thnaks agian John!!



:

Perhaps, but I can't tell what it is.

Post the SQL of the query you want to use.

Post the Concatenate expression you are trying to use.



John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

DontKnow wrote:
Yes you are right!!

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

Is there any work around for this??

Cheers,
thamnks for your help John!!

:

You can use a query in place of the table - IF the query you are using does
NOT have any parameters. If it does have parametersa, I think it will cause
an error.

Experiment and see what you learn.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

DontKnow wrote:
Hi John,

In your example you have a query based on a table, what changes would be
required if the query was based on another query??

Os should I just poor the results of the query into a table??

Is there a better way I don't know??

Cheers in advance!!

:

Quoting Duane Hookom

I use a generic Concatenate() function. The code is listed below with both ADO
and DAO. There are comments regarding which lines to comment or uncomment
based on which library you prefer. Access 97 is mostly DAO while the default
for 2000 and newer is ADO.

See:
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane

Be sure to copy the function into your database and be sure to modify as
appropriate to make it work with your database. See Duane's comments in the
code for the modifications that MAY be needed.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

DontKnow wrote:
Hi Guys,

I wanted to display the output from a single field generated from a query in
a textbox. For instance the single field is called "Course" and the output
is typically:
va
vt
be
as
tg etc

I wanted the output to look like this:

va vt be as tg etc

Is this possible

many thnaks in advance!!

Cheers
 
D

DontKnow

Hi John,

Still doesn't work,

I tried this:
SELECT distinct EmployeeTraining.EmployeeID, EmployeeTraining.LicenceID,
Concatenate("SELECT distinct [Course Name] FROM [CourseTraining] INNER JOIN
[EmployeeTraining] ON [CourseTraining].CourseTrainingID =
[EmployeeTraining].LicenceID WHERE [EmployeeTraining].EmployeeID= " &
[EmployeeTraining].[EmployeeID] & "",",") AS coursename
FROM EmployeeTraining
WHERE (((EmployeeTraining.EmployeeID)=49) AND ((EmployeeTraining.LicenceID)
In (1,2,3,4,5,6,7))); This one provided 3 records (each record the required
responce except 3 records!!!



and also one of yours:

SELECT ET.*
,Concatenate("SELECT [Course Name] FROM [CourseTraining] INNER JOIN
[EmployeeTraining] ON [CourseTraining].CourseTrainingID =
[EmployeeTraining].LicenceID WHERE [EmployeeTraining].EmployeeID= " &
[EmployeeID] & "",",") AS coursename
FROM (SELECT DISTINCT EmployeeID, LicenceID FROM EmployeeTraining WHERE
LicenseID in (1,2,3,4,5,6,7)) as ET

I keep gettin a error on the "(SELECT DISTINCT EmployeeID, LicenceID FROM
EmployeeTraining WHERE
LicenseID in (1,2,3,4,5,6,7)) as ET" part!!

I just could not fix it!!
I don't know if the function is doing the correct thing when there are 2
attributes that are required to be filtered on!! It works fine if there is 1
attribute (ie. Licence ID) but when there are 2 attributes: LicenseID,
EmployeeID. There is always an erroneous duplication of records...

I have fixed the problem but I had to write some sql to capture the first
record only!!

Table: CourseTraining - CourseTrainingId, Course Name, Notes.
PK:CourseTrainingId
Table: EmployeeTraining - EmployeeID, LicenceID, DateCompleted,
CertificateNo. PK: EmployeeID, LicenceID, DateCompleted.

Cheers

Thanks for your help again John!!

John Spencer said:
Using the DISTINCT keyword may give you the results you want, although it will
not be the most efficient way of doing this.

SELECT DISTINCT EmployeeTraining.EmployeeID
, EmployeeTraining.LicenceID
, Concatenate("SELECT [Course Name] FROM [CourseTraining] INNER JOIN
[EmployeeTraining] ON [CourseTraining].CourseTrainingID =
[EmployeeTraining].LicenceID WHERE [EmployeeTraining].EmployeeID= " &
[EmployeeTraining].[EmployeeID] & "",",") AS coursename
FROM EmployeeTraining
WHERE (((EmployeeTraining.EmployeeID)=49) AND ((EmployeeTraining.LicenceID)
In (1,2,3,4,5,6,7)));

I don't know your data structure. There may be a more efficient way to do
this and there may not be. If the above works for you, then use it. If it is
too slow, post back and tell us some thing about your tables

EmployeeTraining - what kind of data does this hold
CourseTraining - what kind of data does this hold

This query with a nested subquery in the FROM clause should give you the
results you want AS LONG AS an employee has only one LicenceID.

SELECT ET.*
,Concatenate("SELECT [Course Name] FROM [CourseTraining] INNER JOIN
[EmployeeTraining] ON [CourseTraining].CourseTrainingID =
[EmployeeTraining].LicenceID WHERE [EmployeeTraining].EmployeeID= " &
[EmployeeID] & "",",") AS coursename
FROM (SELECT DISTINCT EmployeeID, LicenceID FROM EmployeeTraining WHERE
LicenseID in (1,2,3,4,5,6,7)) as ET
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
Hi John,

Here is the SQL view of my query:

SELECT EmployeeTraining.EmployeeID, EmployeeTraining.LicenceID,
Concatenate("SELECT [Course Name] FROM [CourseTraining] INNER JOIN
[EmployeeTraining] ON [CourseTraining].CourseTrainingID =
[EmployeeTraining].LicenceID WHERE [EmployeeTraining].EmployeeID= " &
[EmployeeTraining].[EmployeeID] & "",",") AS coursename
FROM EmployeeTraining
WHERE (((EmployeeTraining.EmployeeID)=49) AND ((EmployeeTraining.LicenceID)
In (1,2,3,4,5,6,7)));

I am actually getting the write values as a result of the query above but I
am also getting 3 records returned where I only need 1??

Any assistance greatly appreciated!!

I have been pulling my hair out on this one!!
Quite frustrating!

Cheers

John Spencer said:
I think you want to use something along the lines of
SELECT EmployeeTraining.EmployeeID
, EmployeeTraining.LicenceID,
concatenate("select [Course Name] from CourseTraining") AS coursename
FROM EmployeeTraining
WHERE EmployeeTraining.EmployeeID=
[forms]![Report Selector Form]![text12])
AND EmployeeTraining.LicenceID in (1,2,3,4,5,6,7)

PERHAPS the expression you are looking for would be.
Concatenate(
"SELECT [Course Name]
FROM [CourseTraining] INNER JOIN [Link Table]
ON [CourseTraining].CourseTrainingID = [Link Table].CourseTrainingID
WHERE [Link Table].EmployeeID=""" &
EmployeeTraining.EmployeeID & """",",")

That is all one line. I have just formatted it for readability.


You did say you can get the data you want horizontally and have a query for
that. May I suggest you post that query? That may give me a better idea of
your structure.


John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

DontKnow wrote:
Hi John the SQKL of the query is:

SELECT EmployeeTraining.EmployeeID, EmployeeTraining.LicenceID,
concatenate("select [Course Name] from CourseTraining") AS coursename
FROM EmployeeTraining
WHERE (((EmployeeTraining.EmployeeID)=[forms]![Report Selector
Form]![text12]) AND ((EmployeeTraining.LicenceID)=1 Or
(EmployeeTraining.LicenceID)=2 Or (EmployeeTraining.LicenceID)=3 Or
(EmployeeTraining.LicenceID)=4 Or (EmployeeTraining.LicenceID)=5 Or
(EmployeeTraining.LicenceID)=6 Or (EmployeeTraining.LicenceID)=7));

The expression I am trying to use is:

coursename: concatenate("select [Course Name] from CourseTraining")

I have 2 tables, one is called CourseTraining, attributes: CourseTrainingID,
Course Name, Notes

2nd Table is a link Table, with attributes: EmployeeID, LicenceID,
Datecompleted, ...

My difficulty is that I am trying to get the [Course Name] from the
CourseTraining Table when I have an EmployeeID and LicenceID from the LInk
Table EmployeeTraing and i don't know how to do this via the QBE to provide a
horizontal output vice a vertical one from the usual QBE query??

I hope this helps??

Thnaks agian John!!



:

Perhaps, but I can't tell what it is.

Post the SQL of the query you want to use.

Post the Concatenate expression you are trying to use.



John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

DontKnow wrote:
Yes you are right!!

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

Is there any work around for this??

Cheers,
thamnks for your help John!!

:

You can use a query in place of the table - IF the query you are using does
NOT have any parameters. If it does have parametersa, I think it will cause
an error.

Experiment and see what you learn.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

DontKnow wrote:
Hi John,

In your example you have a query based on a table, what changes would be
required if the query was based on another query??

Os should I just poor the results of the query into a table??

Is there a better way I don't know??

Cheers in advance!!

:

Quoting Duane Hookom

I use a generic Concatenate() function. The code is listed below with both ADO
and DAO. There are comments regarding which lines to comment or uncomment
based on which library you prefer. Access 97 is mostly DAO while the default
for 2000 and newer is ADO.

See:
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane

Be sure to copy the function into your database and be sure to modify as
appropriate to make it work with your database. See Duane's comments in the
code for the modifications that MAY be needed.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

DontKnow wrote:
Hi Guys,

I wanted to display the output from a single field generated from a query in
a textbox. For instance the single field is called "Course" and the output
is typically:
va
vt
be
as
tg etc

I wanted the output to look like this:

va vt be as tg etc

Is this possible

many thnaks in advance!!

Cheers
 
D

DontKnow

Hi john,

In your example you also wrote which I didn't understand, can you explain
for me:

....WHERE [EmployeeTraining].EmployeeID= " & [EmployeeTraining].[EmployeeID]
& "",",")

The bit I don't follow is the: &"",",") what do the ,"," right at the
end prior to the bracket mean/do?? Do you have something I could read about
what this does??

Thanks for helping me again!!

Cheers

DontKnow said:
Hi John,

Still doesn't work,

I tried this:
SELECT distinct EmployeeTraining.EmployeeID, EmployeeTraining.LicenceID,
Concatenate("SELECT distinct [Course Name] FROM [CourseTraining] INNER JOIN
[EmployeeTraining] ON [CourseTraining].CourseTrainingID =
[EmployeeTraining].LicenceID WHERE [EmployeeTraining].EmployeeID= " &
[EmployeeTraining].[EmployeeID] & "",",") AS coursename
FROM EmployeeTraining
WHERE (((EmployeeTraining.EmployeeID)=49) AND ((EmployeeTraining.LicenceID)
In (1,2,3,4,5,6,7))); This one provided 3 records (each record the required
responce except 3 records!!!



and also one of yours:

SELECT ET.*
,Concatenate("SELECT [Course Name] FROM [CourseTraining] INNER JOIN
[EmployeeTraining] ON [CourseTraining].CourseTrainingID =
[EmployeeTraining].LicenceID WHERE [EmployeeTraining].EmployeeID= " &
[EmployeeID] & "",",") AS coursename
FROM (SELECT DISTINCT EmployeeID, LicenceID FROM EmployeeTraining WHERE
LicenseID in (1,2,3,4,5,6,7)) as ET

I keep gettin a error on the "(SELECT DISTINCT EmployeeID, LicenceID FROM
EmployeeTraining WHERE
LicenseID in (1,2,3,4,5,6,7)) as ET" part!!

I just could not fix it!!
I don't know if the function is doing the correct thing when there are 2
attributes that are required to be filtered on!! It works fine if there is 1
attribute (ie. Licence ID) but when there are 2 attributes: LicenseID,
EmployeeID. There is always an erroneous duplication of records...

I have fixed the problem but I had to write some sql to capture the first
record only!!

Table: CourseTraining - CourseTrainingId, Course Name, Notes.
PK:CourseTrainingId
Table: EmployeeTraining - EmployeeID, LicenceID, DateCompleted,
CertificateNo. PK: EmployeeID, LicenceID, DateCompleted.

Cheers

Thanks for your help again John!!

John Spencer said:
Using the DISTINCT keyword may give you the results you want, although it will
not be the most efficient way of doing this.

SELECT DISTINCT EmployeeTraining.EmployeeID
, EmployeeTraining.LicenceID
, Concatenate("SELECT [Course Name] FROM [CourseTraining] INNER JOIN
[EmployeeTraining] ON [CourseTraining].CourseTrainingID =
[EmployeeTraining].LicenceID WHERE [EmployeeTraining].EmployeeID= " &
[EmployeeTraining].[EmployeeID] & "",",") AS coursename
FROM EmployeeTraining
WHERE (((EmployeeTraining.EmployeeID)=49) AND ((EmployeeTraining.LicenceID)
In (1,2,3,4,5,6,7)));

I don't know your data structure. There may be a more efficient way to do
this and there may not be. If the above works for you, then use it. If it is
too slow, post back and tell us some thing about your tables

EmployeeTraining - what kind of data does this hold
CourseTraining - what kind of data does this hold

This query with a nested subquery in the FROM clause should give you the
results you want AS LONG AS an employee has only one LicenceID.

SELECT ET.*
,Concatenate("SELECT [Course Name] FROM [CourseTraining] INNER JOIN
[EmployeeTraining] ON [CourseTraining].CourseTrainingID =
[EmployeeTraining].LicenceID WHERE [EmployeeTraining].EmployeeID= " &
[EmployeeID] & "",",") AS coursename
FROM (SELECT DISTINCT EmployeeID, LicenceID FROM EmployeeTraining WHERE
LicenseID in (1,2,3,4,5,6,7)) as ET
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
Hi John,

Here is the SQL view of my query:

SELECT EmployeeTraining.EmployeeID, EmployeeTraining.LicenceID,
Concatenate("SELECT [Course Name] FROM [CourseTraining] INNER JOIN
[EmployeeTraining] ON [CourseTraining].CourseTrainingID =
[EmployeeTraining].LicenceID WHERE [EmployeeTraining].EmployeeID= " &
[EmployeeTraining].[EmployeeID] & "",",") AS coursename
FROM EmployeeTraining
WHERE (((EmployeeTraining.EmployeeID)=49) AND ((EmployeeTraining.LicenceID)
In (1,2,3,4,5,6,7)));

I am actually getting the write values as a result of the query above but I
am also getting 3 records returned where I only need 1??

Any assistance greatly appreciated!!

I have been pulling my hair out on this one!!
Quite frustrating!

Cheers

:

I think you want to use something along the lines of
SELECT EmployeeTraining.EmployeeID
, EmployeeTraining.LicenceID,
concatenate("select [Course Name] from CourseTraining") AS coursename
FROM EmployeeTraining
WHERE EmployeeTraining.EmployeeID=
[forms]![Report Selector Form]![text12])
AND EmployeeTraining.LicenceID in (1,2,3,4,5,6,7)

PERHAPS the expression you are looking for would be.
Concatenate(
"SELECT [Course Name]
FROM [CourseTraining] INNER JOIN [Link Table]
ON [CourseTraining].CourseTrainingID = [Link Table].CourseTrainingID
WHERE [Link Table].EmployeeID=""" &
EmployeeTraining.EmployeeID & """",",")

That is all one line. I have just formatted it for readability.


You did say you can get the data you want horizontally and have a query for
that. May I suggest you post that query? That may give me a better idea of
your structure.


John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

DontKnow wrote:
Hi John the SQKL of the query is:

SELECT EmployeeTraining.EmployeeID, EmployeeTraining.LicenceID,
concatenate("select [Course Name] from CourseTraining") AS coursename
FROM EmployeeTraining
WHERE (((EmployeeTraining.EmployeeID)=[forms]![Report Selector
Form]![text12]) AND ((EmployeeTraining.LicenceID)=1 Or
(EmployeeTraining.LicenceID)=2 Or (EmployeeTraining.LicenceID)=3 Or
(EmployeeTraining.LicenceID)=4 Or (EmployeeTraining.LicenceID)=5 Or
(EmployeeTraining.LicenceID)=6 Or (EmployeeTraining.LicenceID)=7));

The expression I am trying to use is:

coursename: concatenate("select [Course Name] from CourseTraining")

I have 2 tables, one is called CourseTraining, attributes: CourseTrainingID,
Course Name, Notes

2nd Table is a link Table, with attributes: EmployeeID, LicenceID,
Datecompleted, ...

My difficulty is that I am trying to get the [Course Name] from the
CourseTraining Table when I have an EmployeeID and LicenceID from the LInk
Table EmployeeTraing and i don't know how to do this via the QBE to provide a
horizontal output vice a vertical one from the usual QBE query??

I hope this helps??

Thnaks agian John!!



:

Perhaps, but I can't tell what it is.

Post the SQL of the query you want to use.

Post the Concatenate expression you are trying to use.



John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

DontKnow wrote:
Yes you are right!!

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

Is there any work around for this??

Cheers,
thamnks for your help John!!

:

You can use a query in place of the table - IF the query you are using does
NOT have any parameters. If it does have parametersa, I think it will cause
an error.

Experiment and see what you learn.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

DontKnow wrote:
Hi John,

In your example you have a query based on a table, what changes would be
required if the query was based on another query??

Os should I just poor the results of the query into a table??

Is there a better way I don't know??

Cheers in advance!!

:

Quoting Duane Hookom

I use a generic Concatenate() function. The code is listed below with both ADO
and DAO. There are comments regarding which lines to comment or uncomment
based on which library you prefer. Access 97 is mostly DAO while the default
for 2000 and newer is ADO.

See:
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane

Be sure to copy the function into your database and be sure to modify as
appropriate to make it work with your database. See Duane's comments in the
code for the modifications that MAY be needed.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

DontKnow wrote:
Hi Guys,

I wanted to display the output from a single field generated from a query in
a textbox. For instance the single field is called "Course" and the output
is typically:
va
vt
be
as
tg etc

I wanted the output to look like this:

va vt be as tg etc

Is this possible

many thnaks in advance!!

Cheers
 
J

John Spencer

My error. The & "" should not be there if EmployeeId is numeric.

The , "," identifies the delimiter to be used between items.

So, perhaps I'll get it right this time

SELECT DISTINCT EmployeeTraining.EmployeeID
, EmployeeTraining.LicenceID
, Concatenate("SELECT [Course Name] FROM [CourseTraining] INNER JOIN
[EmployeeTraining] ON [CourseTraining].CourseTrainingID =
[EmployeeTraining].LicenceID WHERE [EmployeeTraining].EmployeeID= " &
[EmployeeTraining].[EmployeeID],",") AS coursename
FROM EmployeeTraining
WHERE (((EmployeeTraining.EmployeeID)=49) AND ((EmployeeTraining.LicenceID)
In (1,2,3,4,5,6,7)));

IF EmployeeID were a text field then you would need to include quote
marks around the field. One way to do this is to use two quote marks
where you want to have one quote mark in the final string.

....
, Concatenate("SELECT [Course Name] FROM [CourseTraining] INNER JOIN
[EmployeeTraining] ON [CourseTraining].CourseTrainingID =
[EmployeeTraining].LicenceID WHERE [EmployeeTraining].EmployeeID= """ &
[EmployeeTraining].[EmployeeID] & """",",") AS coursename
....

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================

Hi john,

In your example you also wrote which I didn't understand, can you explain
for me:

...WHERE [EmployeeTraining].EmployeeID= " & [EmployeeTraining].[EmployeeID]
& "",",")

The bit I don't follow is the: &"",",") what do the ,"," right at the
end prior to the bracket mean/do?? Do you have something I could read about
what this does??

Thanks for helping me again!!

Cheers

DontKnow said:
Hi John,

Still doesn't work,

I tried this:
SELECT distinct EmployeeTraining.EmployeeID, EmployeeTraining.LicenceID,
Concatenate("SELECT distinct [Course Name] FROM [CourseTraining] INNER JOIN
[EmployeeTraining] ON [CourseTraining].CourseTrainingID =
[EmployeeTraining].LicenceID WHERE [EmployeeTraining].EmployeeID= " &
[EmployeeTraining].[EmployeeID] & "",",") AS coursename
FROM EmployeeTraining
WHERE (((EmployeeTraining.EmployeeID)=49) AND ((EmployeeTraining.LicenceID)
In (1,2,3,4,5,6,7))); This one provided 3 records (each record the required
responce except 3 records!!!



and also one of yours:

SELECT ET.*
,Concatenate("SELECT [Course Name] FROM [CourseTraining] INNER JOIN
[EmployeeTraining] ON [CourseTraining].CourseTrainingID =
[EmployeeTraining].LicenceID WHERE [EmployeeTraining].EmployeeID= " &
[EmployeeID] & "",",") AS coursename
FROM (SELECT DISTINCT EmployeeID, LicenceID FROM EmployeeTraining WHERE
LicenseID in (1,2,3,4,5,6,7)) as ET
I keep gettin a error on the "(SELECT DISTINCT EmployeeID, LicenceID FROM
EmployeeTraining WHERE
LicenseID in (1,2,3,4,5,6,7)) as ET" part!!
I just could not fix it!!
I don't know if the function is doing the correct thing when there are 2
attributes that are required to be filtered on!! It works fine if there is 1
attribute (ie. Licence ID) but when there are 2 attributes: LicenseID,
EmployeeID. There is always an erroneous duplication of records...

I have fixed the problem but I had to write some sql to capture the first
record only!!

Table: CourseTraining - CourseTrainingId, Course Name, Notes.
PK:CourseTrainingId
Table: EmployeeTraining - EmployeeID, LicenceID, DateCompleted,
CertificateNo. PK: EmployeeID, LicenceID, DateCompleted.

Cheers

Thanks for your help again John!!

John Spencer said:
Using the DISTINCT keyword may give you the results you want, although it will
not be the most efficient way of doing this.

SELECT DISTINCT EmployeeTraining.EmployeeID
, EmployeeTraining.LicenceID
, Concatenate("SELECT [Course Name] FROM [CourseTraining] INNER JOIN
[EmployeeTraining] ON [CourseTraining].CourseTrainingID =
[EmployeeTraining].LicenceID WHERE [EmployeeTraining].EmployeeID= " &
[EmployeeTraining].[EmployeeID] & "",",") AS coursename
FROM EmployeeTraining
WHERE (((EmployeeTraining.EmployeeID)=49) AND ((EmployeeTraining.LicenceID)
In (1,2,3,4,5,6,7)));

I don't know your data structure. There may be a more efficient way to do
this and there may not be. If the above works for you, then use it. If it is
too slow, post back and tell us some thing about your tables

EmployeeTraining - what kind of data does this hold
CourseTraining - what kind of data does this hold

This query with a nested subquery in the FROM clause should give you the
results you want AS LONG AS an employee has only one LicenceID.

SELECT ET.*
,Concatenate("SELECT [Course Name] FROM [CourseTraining] INNER JOIN
[EmployeeTraining] ON [CourseTraining].CourseTrainingID =
[EmployeeTraining].LicenceID WHERE [EmployeeTraining].EmployeeID= " &
[EmployeeID] & "",",") AS coursename
FROM (SELECT DISTINCT EmployeeID, LicenceID FROM EmployeeTraining WHERE
LicenseID in (1,2,3,4,5,6,7)) as ET
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

DontKnow wrote:
Hi John,

Here is the SQL view of my query:

SELECT EmployeeTraining.EmployeeID, EmployeeTraining.LicenceID,
Concatenate("SELECT [Course Name] FROM [CourseTraining] INNER JOIN
[EmployeeTraining] ON [CourseTraining].CourseTrainingID =
[EmployeeTraining].LicenceID WHERE [EmployeeTraining].EmployeeID= " &
[EmployeeTraining].[EmployeeID] & "",",") AS coursename
FROM EmployeeTraining
WHERE (((EmployeeTraining.EmployeeID)=49) AND ((EmployeeTraining.LicenceID)
In (1,2,3,4,5,6,7)));

I am actually getting the write values as a result of the query above but I
am also getting 3 records returned where I only need 1??

Any assistance greatly appreciated!!

I have been pulling my hair out on this one!!
Quite frustrating!

Cheers

:

I think you want to use something along the lines of
SELECT EmployeeTraining.EmployeeID
, EmployeeTraining.LicenceID,
concatenate("select [Course Name] from CourseTraining") AS coursename
FROM EmployeeTraining
WHERE EmployeeTraining.EmployeeID=
[forms]![Report Selector Form]![text12])
AND EmployeeTraining.LicenceID in (1,2,3,4,5,6,7)

PERHAPS the expression you are looking for would be.
Concatenate(
"SELECT [Course Name]
FROM [CourseTraining] INNER JOIN [Link Table]
ON [CourseTraining].CourseTrainingID = [Link Table].CourseTrainingID
WHERE [Link Table].EmployeeID=""" &
EmployeeTraining.EmployeeID & """",",")

That is all one line. I have just formatted it for readability.


You did say you can get the data you want horizontally and have a query for
that. May I suggest you post that query? That may give me a better idea of
your structure.


John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

DontKnow wrote:
Hi John the SQKL of the query is:

SELECT EmployeeTraining.EmployeeID, EmployeeTraining.LicenceID,
concatenate("select [Course Name] from CourseTraining") AS coursename
FROM EmployeeTraining
WHERE (((EmployeeTraining.EmployeeID)=[forms]![Report Selector
Form]![text12]) AND ((EmployeeTraining.LicenceID)=1 Or
(EmployeeTraining.LicenceID)=2 Or (EmployeeTraining.LicenceID)=3 Or
(EmployeeTraining.LicenceID)=4 Or (EmployeeTraining.LicenceID)=5 Or
(EmployeeTraining.LicenceID)=6 Or (EmployeeTraining.LicenceID)=7));

The expression I am trying to use is:

coursename: concatenate("select [Course Name] from CourseTraining")

I have 2 tables, one is called CourseTraining, attributes: CourseTrainingID,
Course Name, Notes

2nd Table is a link Table, with attributes: EmployeeID, LicenceID,
Datecompleted, ...

My difficulty is that I am trying to get the [Course Name] from the
CourseTraining Table when I have an EmployeeID and LicenceID from the LInk
Table EmployeeTraing and i don't know how to do this via the QBE to provide a
horizontal output vice a vertical one from the usual QBE query??

I hope this helps??

Thnaks agian John!!



:

Perhaps, but I can't tell what it is.

Post the SQL of the query you want to use.

Post the Concatenate expression you are trying to use.



John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

DontKnow wrote:
Yes you are right!!

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

Is there any work around for this??

Cheers,
thamnks for your help John!!

:

You can use a query in place of the table - IF the query you are using does
NOT have any parameters. If it does have parametersa, I think it will cause
an error.

Experiment and see what you learn.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

DontKnow wrote:
Hi John,

In your example you have a query based on a table, what changes would be
required if the query was based on another query??

Os should I just poor the results of the query into a table??

Is there a better way I don't know??

Cheers in advance!!

:

Quoting Duane Hookom

I use a generic Concatenate() function. The code is listed below with both ADO
and DAO. There are comments regarding which lines to comment or uncomment
based on which library you prefer. Access 97 is mostly DAO while the default
for 2000 and newer is ADO.

See:
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane

Be sure to copy the function into your database and be sure to modify as
appropriate to make it work with your database. See Duane's comments in the
code for the modifications that MAY be needed.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

DontKnow wrote:
Hi Guys,

I wanted to display the output from a single field generated from a query in
a textbox. For instance the single field is called "Course" and the output
is typically:
va
vt
be
as
tg etc

I wanted the output to look like this:

va vt be as tg etc

Is this possible

many thnaks in advance!!

Cheers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top