Calculating in a Query (1 Viewer)

robbie9

Registered User.
Local time
Today, 05:27
Joined
Feb 11, 2001
Messages
17
Ok..I am stuck.... I need to calculate labor costs in a query based on the Length of a counter top.. I would like to make a module to do the calculations for me, but I am having a tough time getting it to work.. I made my Module, but when I call it from the Query, it tells me I need to define the function?!?!?!.. Any Ideas??
 

Mile-O

Back once again...
Local time
Today, 05:27
Joined
Dec 10, 2002
Messages
11,316
In the module, the function you wish to use in the query must be declared as Public

i.e.


Code:
Public MyCode() As String

   ' code in here

End Function
 

dcx693

Registered User.
Local time
Today, 00:27
Joined
Apr 30, 2003
Messages
3,265
Functions are public by default. Where did you place the function code? In a form module, or in a separate module?
 

robbie9

Registered User.
Local time
Today, 05:27
Joined
Feb 11, 2001
Messages
17
I got it... Thanks..... My Brain was just not with it this mornig..
 

Users who are viewing this thread

Top Bottom