From: John W. Vinson on
On Tue, 29 Dec 2009 10:21:02 -0800, Dave Schoeff
<DaveSchoeff(a)discussions.microsoft.com> wrote:

>Your Concatenate function is all over Google. Took a little bit to find it.
>So I can use a function inside of a SQL statement? What a concept - just
>like a udf in Sql Server. This will do exactly what I want. The VBA is no
>barrier, I just didn't know how to avoid writing a specific function for
>every attribute I wanted to aggregate. Can I use a function in a query
>designed in the Query interface? That would make it possible for my advanced
>users to write their own queries. They get real pale when I show them the
>VBA window.

Sure. If you want the result of a function as a calculated field in a Query
just type

NewFieldName: YourFunction(argument1, argument2)

in a vacant Field cell in the query grid.

Note that searching or sorting by a field calculated in this way will be slow,
since Access cannot index calculated fields.
--

John W. Vinson [MVP]
From: John W. Vinson on
On Tue, 29 Dec 2009 10:35:01 -0800, Dave Schoeff
<DaveSchoeff(a)discussions.microsoft.com> wrote:

>This application has forms which could display the data in subforms or
>subreports. The problem is I need to get output in Excel. I was hoping to
>get a query that would roll all of the data for each course into records
>that could be exported.

Not a problem. Create the Query and export *the query* (rather than the
table). See the VBA help for "TransferSpreadsheet" if you would like to
automate the export process.
--

John W. Vinson [MVP]