[AccessD] VBA Function with parameters

Paul Hartland paul.hartland at googlemail.com
Fri Nov 5 00:00:37 CDT 2021


See answer at bottom of this link, is this what you are after ?

https://stackoverflow.com/questions/38250515/vba-restrict-function-arguments-to-only-selected-values

Paul

On Fri, 5 Nov 2021, 04:56 Borge Hansen, <pcs.accessd at gmail.com> wrote:

> Hi,
> How can I provide parameters to my own function similar to for example:
>
> DoCmd.OpenQuery (QueryName, View, DataMode)
> where DataMode is optional and can be one of these constants
> acAdd
> acEdit (default) - which I think allows for adding as well if the
> query view make it possible
> acViewOnly
>
> So for example
> function myFunction(param1, param2)
>
> where param2 is an optional parameter with a limited set of values.
> When the function is being used elsewhere in the app, I expect the
> limited set of values for param2 to appear, similar to for example the
> docmd.openquery ...
>
> ??
>
> /borge
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


More information about the AccessD mailing list