No need to shout...
Functions are only different from procedures in that they are designed to return a value. You can put them in the code behind your form or in common modules. The only reason to put them in modules is if you want to call the same function from many modules. Here is an example of a function that clears out dingle quotes from text so that I can pass that text to SQL strings without causing error. This function is called from many forms so it is in a module.
------------------------
Public Function TranslateSQL(field_value As String) As String
Dim strText As String
Dim i As Integer
strText = field_value
For i = 1 To Len(field_value)
If Mid(field_value, i, 1) = Chr(39) Then
strText = Left(strText, i - 1) + Chr(32)
strText = strText + Mid(field_value, i + 1, Len(field_value))
End If
Next i
TranslateSQL = strText
End Function
------------------------
You call a function by assigning it's return value to a variable or control and adding any parameters required by the function in brackets. The declaration of the function defines what parameters are required. In this case I need some text to search...
Dim strConvString as String
strConvString = TranslateSQL(ctlDescription)
---HTH
Chris