Re: invalid syntax

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Wed, 29 Jun 2005 13:56:06 -0700, MMH
<MMH@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

>I am trying to set the status of certain deliverables. I get an invalid
>syntax error with this statment. I am sure I am missing parentheses somewhere
>but I am not sure where.
>
>
>=IIf([Date Rec'd]>[Dute Date],?Past Due?,IIf([Dute Date]<Date(),?Past
>Due?,IIf([Date Rec'd]<[Dute Date],?On Time?,?Pending?)))
>
>
>Thanks

Is it really "Dute Date" as opposed to "Due Date"?

let's take this nested IIF apart:

=IIf([Date Rec'd]>[Dute Date],
?Past Due?, << true branch 1
IIf([Dute Date]<Date(), << false branch 1
?Past Due?, << true branch 2
IIf([Date Rec'd]<[Dute Date], << false branch 2
?On Time?, << true branch 3
?Pending?))) << false branch 3

You might have better luck with the Switch() function - see the online
help in the VBA editor.

John W. Vinson[MVP]

.



Relevant Pages

  • invalid syntax
    ... I get an invalid ... syntax error with this statment. ... I am sure I am missing parentheses somewhere ...
    (microsoft.public.access.formscoding)
  • syntax error
    ... I get an invalid ... syntax error with this statment. ... I am sure I am missing parentheses somewhere ...
    (microsoft.public.access.gettingstarted)
  • Re: invalid syntax
    ... >I am trying to set the status of certain deliverables. ... I get an invalid ... > syntax error with this statment. ...
    (microsoft.public.access.formscoding)
  • Mozilla 1.6 (Gtk 1.2) on FreeBSD 4.9-Release compilation problem
    ... nsHostResolver.h:86: syntax error before `*' ... nsDNSService2.cpp:87: invalid use of type decl `struct addrinfo' as expression ...
    (freebsd-questions)
  • Re: [QUIZ] Dice Roller (#61)
    ... in that it allows expressions like this: ... >}> which is invalid. ... > syntax error. ... Pierre ...
    (comp.lang.ruby)