Hassan,

When you first paste the formulas Tom gave you into a query Access will try to be helpful and convert the 'Year' function to a field hence the square brackets [Year]. See what Access does in the example below in pink...

Age1: DateDiff("yyyy",[Lifetimetbl].[Dob1],Date())+(Date()<DateSerial([Year](Date()),Month([Lifetimetbl].[Dob1]),Day([Lifetimetbl].[Dob1])))

All you have to do is go into the query and remove the square brackets from either side of the [Year] and this will fix the problem. Save your query after that.

Duane Hennessy.
Bandicoot Software
Tropical Queensland, Australia
(ABN: 33 682 969 957)

Want Increased Productivity?
http://www.bandicootsoftware.com.au


--- In AccessDevelopers@yahoogroups.com, "Hassan" <[EMAIL PROTECTED]> wrote:
>
> Thanks tom for your quick response!
> after typing your strings i get an error
> undefined function [year]in _expression_
>
> any suggestions??
>




Please zip all files prior to uploading to Files section.




SPONSORED LINKS
Microsoft access developer Microsoft access help Microsoft access database
Microsoft access training Microsoft access training course Microsoft access programming


YAHOO! GROUPS LINKS




Reply via email to