Re: DatePart or multi parameter functions return invalid comma error
From: Roger Carlson (NO-Rog3erc-SPAM_at_hotmail.com)
Date: 08/20/04
- Next message: Douglas J. Steele: "Re: Sort by Month"
- Previous message: doug: "in code query"
- In reply to: Frankie0042: "DatePart or multi parameter functions return invalid comma error"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 20 Aug 2004 08:59:18 -0400
Before you go any further, check your References. Go to any code window and
choose Tools > References. See if any of them are marked as MISSING.
Uncheck that one (make a note of what it is first) and then close the
window. Test to see if your DatePart problem still occurs. When you have a
missing reference, it can often manifest itself as an error in many of the
"built-in" functions.
--
--Roger Carlson
www.rogersaccesslibrary.com
Reply to: Roger dot Carlson at Spectrum-Health dot Org
"Frankie0042" <Frankie0042@discussions.microsoft.com> wrote in message
news:CAE5875D-49DB-487E-86EA-196C2A826C75@microsoft.com...
> Hi
>
> I have a problem with all the versions of Access after 2000. It seems that
a
> change was made in the way functions work. If you pass in 2 or more
> parameters you now have to separate them with spaces instead of commas.
Even
> when I use spaces, this still gives me an error. The Northwind sample
> database also has this error. I have installed all of the service packs
and
> bug fixes and I still get this problem.
>
> For example:
>
> select DatePart("q",[OrderDate],1,0) from Orders
>
> or
>
> DatePart("q" [OrderDate] 1 0)
>
> both report the second parameter as an error. In fact any functions with
> more than one parameter has this problem.
>
> Are you not allowed to have more than one parameter in these versions of
> Access? Or what is the correct syntax? Why does the Northwind database not
> use the correct syntax?
>
> If you're trying to duplicate the error, use the "Quarterly Orders by
> Product" query in the Northwind sample database. You might have to go in
and
> out of the design window and query window to get the error.
>
> Thanks
> Francois
- Next message: Douglas J. Steele: "Re: Sort by Month"
- Previous message: doug: "in code query"
- In reply to: Frankie0042: "DatePart or multi parameter functions return invalid comma error"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|