General discussion

Locked

Call a function in a query

By Makita ·
How do you call a user-defined function in a query? I have a user-defined function that I want to call during a query, can this me done?

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by TimFox2 In reply to Call a function in a quer ...

Yes - It's best to organise such functions in a module and make sure the function is defined as a public funtion. Use the Build button (the ... elipse) in the query design window to help show you the format required.

But be careful. I hope that you are using the user-defined function because Access doesn't already have the function that you require, but just be sure that the function is constructed so that it returns an appropriate string to your query and that posisble error conditions are handled - so that your query doesn't return dodgy recordsets.

Collapse -

by techrep In reply to Call a function in a quer ...

You call it just like you would any other function. For example:

select * from employees where myuserfunction() = true

Collapse -

by Makita In reply to

Poster rated this answer.

Collapse -

by Makita In reply to Call a function in a quer ...

This question was closed by the author

Back to Web Development Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums