datAdrenaline
AWF VIP
- Local time
- Today, 13:06
- Joined
- Jun 23, 2008
- Messages
- 697
Hello Doco ...
I don't think that is what is being said ... I *think* ... the intent is something like this ... if there is an expression you can create with an Access function (or functions) then use them appropriately ... but it would not be a good use of resources just write code for the sake of writing code ....
BAD PRACTICE EXAMPLE ...
Control Source: =MyRoundFunction([SomeControl],2)
The above would be senseless (at least on the surface) simply because you can use the built-in Round() function in your control source ...
So expanding a bit, you can create many expressions to use in Control Sources or column expressions in queries that DON'T neccessitate the creation of VBA code to return your specific desired result. The "breaking point" of when to jump to VBA is typically a developer preference.
I don't think that is what is being said ... I *think* ... the intent is something like this ... if there is an expression you can create with an Access function (or functions) then use them appropriately ... but it would not be a good use of resources just write code for the sake of writing code ....
BAD PRACTICE EXAMPLE ...
Control Source: =MyRoundFunction([SomeControl],2)
Code:
Public Function MyRoundFunction(dblNumber As Double, lngDecimals) As Variant
MyRoundFunction = Round(dblNumber, lngDecimals)
End Function
The above would be senseless (at least on the surface) simply because you can use the built-in Round() function in your control source ...
So expanding a bit, you can create many expressions to use in Control Sources or column expressions in queries that DON'T neccessitate the creation of VBA code to return your specific desired result. The "breaking point" of when to jump to VBA is typically a developer preference.
Last edited: