Re: DatePart or multi parameter functions return invalid comma error

From: Roger Carlson (NO-Rog3erc-SPAM_at_hotmail.com)
Date: 08/20/04


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


Relevant Pages

  • Re: The expression you entered has a function name that DB cant f
    ... "Ken Snell " wrote: ... recent database has a form with no buttons at all. ... If any of the database's references are messed up on a PC -- you can ... Debug Window, using Ctrl-G, provided you haven't selected the "keep ...
    (microsoft.public.access.macros)
  • Re: Compile error. in table-level validation expression. (Error 33
    ... Thanks for telling me how to find missing references. ... when I open the window 'References - Access9db' ... >> I've tried compacting and repairing, also copied the database. ...
    (microsoft.public.access.forms)
  • Re: Event Procedure to Preview Report closes Access
    ... Compact the database to get rid of this junk: ... Uncheck any references you do not need. ... Still in the code window, choose Compile from the Debug menu. ...
    (microsoft.public.access.reports)
  • Re: filter sort error - crash!
    ... Compact the database to get rid of this junk: ... Open a code window. ... Uncheck any references you do not need. ... Still in the code window, choose Compile from the Debug menu. ...
    (microsoft.public.access.forms)
  • Drop down menu referencing table, but no data is shown?
    ... using FP8.0 and am trying to make a drop down menu that references a ... table in my data base, ie rather than mking the drop down menu source ... I have made the relationship in the "define database" ... window and in the "layout" it has a drop down arrow icon, ...
    (comp.databases.filemaker)