A family of Microsoft relational database management systems designed for ease of use.
You can execute the function by putting it directly in the OnClick property - preceded by an = sign:
=NameOfPublicFunction()
If the function can be called from multiple forms, I'll often pass the form reference:
Public Function NameOfPublicFunction(frm As Form) As Integer
...
and set the event procedure to
=NameOfPublicFunction([Form])
You can then refer to other controls or properties of the form within the procedure:
If frm.Name = "SpecialForm" Then...
The = sign apparently tells the VBA engine that you're expecting a value to be returned; that's why it must be a Public Function (which returns a value), not a Public Sub (which doesn't). So far as I've been able to determine, you can't do anything with the returned value, so even though you could assign NameOfPublicFunction a value in the code, there doesn't seem to be anything you can do with it!