SELECT FROM function in Access 2000

  • Thread starter Thread starter Paolo Bormida
  • Start date Start date
P

Paolo Bormida

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
 
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.
 
Back
Top