user-defined functions.

J

Jim Moberg

Hi,

I have written a bunch of queries for the managers in my office and they
seem to ask for certain calculations in many of those queries. Is there a
way I can define a function for each calculation and then reference them in
my queries so I don't reinvent these calculations each time I create a new
query?

If so then where do I get started?

If the answer lies in writing VBA code would you please direct me to a place
that can walk a person through how to write this code for the first time? I
have many years of programming experience but none writing VBA code. I don't
even know where the code is typed in within MS-Access.
 
E

ES

StripSign([ExchMtlInv],2) AS ExchInv - taken out of sql statement

Public Function StripSign(strInput_data As String, intDecimal As Integer) As
Double
Code:
End Function

the function goes in a module (under objects)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top