User Defined functions are functions you design yourself to return a
value.
They are stored in a Module.
On the main database folder, click on Modules
Write your function in the code window that opens:
Function DoSomething(FieldIn)
'Function code goes here
DoSomething = some value
End Function
Exit the module and save it under a name other than "DoSomething".
You can run it from a query, Control Source, or code event.
As a control source:
=DoSomething([FieldName])
From a command button event:
strResult = DoSomething ([FieldName])
From a query:
ExpoSomething([FieldName])
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.