Thanks for your help. Can you tell me where I can find out about function
arguments and calling statements? I could not find anything useful in VBA
Help.
Dudley
a function argument is...like a box or bin in which you place a value, so
that the value can be used by the code in the function. it usually has a
specific data type, to help you put the right kind of value into it. for
instance, take a look at the DateDiff Function topic in Access Help. it has
5 arguments - 3 required and 2 optional. if you want to find out how many
days are between 1/1/2006 and today, you have to place those specific values
in the arguments:
DateDiff("d", #1/1/2006#, Date())
the DateDiff() function is a built-in function in Access. you can also write
custom functions, with or without arguments as needed, and call them from
within a module, and also in expressions in queries, forms, reports, macros,
and modules. the code you posted gives a good example of a function with an
argument:
InvoicePriceIncVAT(INum As Long)
that includes code that calls another function with arguments:
InvoiceTotal("Price inc VAT", INum)
hth
> Thanks for your help. Can you tell me where I can find out about function
> arguments and calling statements? I could not find anything useful in VBA
[quoted text clipped - 42 lines]
> > > Thanks
> > > Dudley