Re: SELECT FROM function in Access 2000

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Roger Carlson (NO-Rog3erc-SPAM_at_hotmail.com)
Date: 04/27/04


Date: Tue, 27 Apr 2004 10:39:34 -0400

There is a seriously weird, undocumented format for using a subquery in the
>From clause - essentially as another table. It won't work if you have spaces
or special characters in the names of tables or fields (which I don't like
anyway). The syntax is:

[insert your query here]. As SomeAlias

The left and right square brackets are required, the dot after the right
bracket is required, and the As and alias are required. You can't do
ANYTHING that would require the use of square brackets, inside
the square brackets - that's why no spaces or special characters in names.

-- 
--Roger Carlson
  www.rogersaccesslibrary.com
  Reply to: Roger dot Carlson at Spectrum-Health dot Org
"Paolo Bormida" <paolo.bormida@inwind.it> wrote in message
news:fe0c69d.0404270609.4f58cfa9@posting.google.com...
> Hi all,
>
> any idea how to create a function returning a recordset to be used in
> a FROM clause of a SELECT?
>
> I explain better.
>
> I would like to write a function (in a VBA Module) that builds up a
> resultset, then that resultset must be query-able again with a select.
>
> Is that possible in Access 2000 ? In any newer version?
>
> TIA
>
> Paolo


Relevant Pages

  • Re: help using a parameter in an In (...) criteria
    ... I don't understand why my three other parameters are in square brackets in ... don't understand why in the SELECT clause the table/field are as ... Here is my SQL: ... FROM Survey INNER JOIN GroupLocation ON Survey.Survey_ID = ...
    (microsoft.public.access.queries)
  • Re: Adding variables to object as name-value pairs
    ... I have tried various permutations of ... the following (ie using square brackets instead of dot etc) without ... success. ...
    (comp.lang.javascript)
  • Re: Negate a regular expression
    ... Ken Foskey wrote: ... square brackets are a character class. ... I put that first and the exit statement in the else clause and it does ...
    (perl.beginners)