Full Version: Immediate Window
UtterAccess Forums > Microsoft® Access > Access Forms
access2009eg
friends;
how can i use immediate windows to test the following function
CODE
Private Function clc2n(i As Double, a As Integer) As Double
clc2n = i + a
End Function
strBean
Change it to Public Function, or just Function, then call it in the Immediate Pane with the required argument.
CyberCow
Just type this into your immediate window:
?clc2n(12.34,22)
The 12.34 represents your "i As Double" and the 22 represents your "a As Integer"
And as strBean points out, it needs to be a Public function to run in the Immediate Window
hop this helps
access2009eg
work with me in standard module not form module is this right
strBean
Oh yes, that's right. Put the function in a module to test it. Note that you can leave it there in the module, and the form can use it with no problem.
You can test it in the form, too, by using standard controls, maybe a MsgBox...
access2009eg
CyberCow
trBean
oid=":thumbup:" border="0" alt="thumbup.gif" />
hat_tip.gif
CyberCow
Sam and I were happy to help.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.