Results 1 to 3 of 3
  1. #1
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383

    Operand without operator or


    Trying desperately to enter criteria into query. Whats wrong with my syntax?
    chk:If ([PeriodTypeID]) = "d" And ([PeriodFreq]) = "1" [txtentered] = EventStart + 1 ElseIf ([PeriodTypeID]) = "ww" And ([PeriodFreq]) = "1" Then txtentered = [EventStart] + 7 ElseIf ([PeriodTypeID]) = "q" And ([PeriodFreq]) = "1" Then txtentered = [EventStart] + 90

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    If/Then code is only valid in VBA. In a query, you can use the IIf() function. You can either nest them to do what you're doing or use the Switch() function.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    ok, thanks. Too complex for me.. Thanks Anyway!
    Last edited by burrina; 12-31-2012 at 06:38 PM. Reason: Give up

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Or operator
    By Rhubie in forum Access
    Replies: 1
    Last Post: 09-06-2012, 04:42 PM
  2. Modal Form Operator
    By mm07nkb in forum Forms
    Replies: 5
    Last Post: 09-01-2011, 10:53 AM
  3. Like operand in Iif Or expression
    By Hwyn9a in forum Queries
    Replies: 2
    Last Post: 03-05-2011, 01:36 PM
  4. in operator
    By pchang in forum Access
    Replies: 1
    Last Post: 01-16-2011, 06:24 AM
  5. Missing Operator error
    By data123 in forum Forms
    Replies: 1
    Last Post: 03-15-2009, 04:34 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums