create a calculated field in SQL

G

Guest

I have wrote the code to create a query

strSQL = "SELECT [table1].field1 ....

inside the SQL statment I want to create a field that will
be calculated from a function

Thank you in advance
 
M

Marshall Barton

I have wrote the code to create a query

strSQL = "SELECT [table1].field1 ....

inside the SQL statment I want to create a field that will
be calculated from a function

strSQL = "SELECT [table1].field1, " _
& "func(table1.field2) AS calcname, " _
& " . . .

If you're using a function you created in a standard module,
make sure the it is declared Public.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top