Modules (1 Viewer)

bgcogen

Registered User.
Local time
Today, 14:16
Joined
Apr 19, 2002
Messages
61
I've created a module, but what is the command I have to include at the end of the code to make it return its value to a query instead of a Debug window??

Thanks a million
:)
 

chenn

Registered User.
Local time
Today, 14:16
Joined
Apr 19, 2002
Messages
69
Not exactly sure what you want to do. In order for a module to return a function you need to declare it in the function line. For example:

Function TEST()as integer

'...your code

'place at end of code

TEST = 9

end function

This function will return 9. In the criteria section of your query you need to call the function. Example: TEST()
 

David R

I know a few things...
Local time
Today, 08:16
Joined
Oct 23, 2001
Messages
2,633
Near the end of your function should a line:
Code:
FunctionName = (variable or calculation or Null or string or something)

Then in your query just put your function on a blank line of the query, with any parameters it needs in the parentheses.

Examples:
Field: fOSUSerName()
Field: PartLoc([Address])
 

Users who are viewing this thread

Top Bottom