Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

functions in queries

Status
Not open for further replies.

villan60

Technical User
Jul 5, 2001
23
ZA
Can I use a function that returns a field name as a field name in a query?

I have written a function which selects the field and returns it but when I use it as a field in the query I get an error 'Undefined function in expression'

any ideas?

Thanks
dax
 
you can use such type of functions only in making dinamic SQL

dim xxx as string
function yyy() as string
yyy = "name of a column"
end function

function zzz()
xxx = "select " + yyy + "from sometable"
docmd.runsql xxx
end function John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top