You can create a QueryDef object, and set its SQL property to the SQL
statement generated by the function. As well, you can set the RecordSource
for a report equal to the SQL statement itself.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)
"ITMA" <mindyourownbusiness@net.net> wrote in message
news:3fef2907$1_3@mk-nntp-1.news.uk.worldonline.com...[color=blue]
> Any Google search will show that somewhere out there is a kind spirited
> Michel Walsh has been most generous in his time over the years in giving,
> in reply to several postings on the matter, a Function as a solution to
> holding column headings constant, so that a cross tab query (the fields of
> which would otherwise change depending on the input data) can be reliably
> used as the basis of another Query, Report or Form. What, unfortunately,[/color]
he[color=blue]
> seems with similar consistency to avoid is telling us all how to actually
> use that Function! Anyone got any ideas. Basically, it returns a string
> starting "SELECT .....". How can I use a function generating a SQL
> statement to actually create a useable Query?
>
>[/color]