
Can't execute a user define function in an SQL statement
Quote:
> SELECT CM.CM_no,
> module_description,
> CM.Date,
> Datediff("y",[date],Now()) AS Days_Elap,
> CM.Details,
> mid ([cm].[cm_no],5,2) AS Year,
> left([cm].[cm_no],3) AS Header,
> calculate_age([date]) as Days_Elaps
> FROM (Completed RIGHT JOIN CM ON Completed.CM_no = CM.CM_no)
> LEFT JOIN Module ON left([CM].[CM_no],3) = module.Module
> WHERE (((Completed.CM_no) Is Null));
Well, there's clearly problems with subnormalised data, and the use of
reserved words does make things more difficult to analyse.
Can we assume that you are calling this all within Access, not from VB
or delphi etc?
How is calculate_age defined: again, can we assume this is a Public
Function in a normal module? Is module_description a function or a
field name?
What exactly is the error message:
Quote:
>the computer replied, function not found or something like that
could be a little more explicit!
Tim F
--