Results 1 to 2 of 2
  1. #1
    drz is offline Novice
    Windows 8 Access 2013 64bit
    Join Date
    Nov 2016

    Access IIf function help

    Hello - hope someone can assist with this simple function - I'm stuck...

    I'm creating a query, among others there are two fields named DSalePrice and DRetailPrice.
    I want to create a new field that will return the lesser of DSalePrice and DRetailPrice.
    The function I created is:

    IIf([DSalePrice]<[DRetailPrice], [DSalePrice], [DRetailPrice])

    I keep getting an error that says The expression you entered contains invalid syntax. You omitted an operand or operator, you entered an invalid character or comma, or you entered text without surrounding it in quotation marks.

    Would appreciate any help. Schedule

  2. #2
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Show us the whole SQL string, this may not be where the error is occurring.

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

Similar Threads

  1. access qry to vba function
    By slimjen in forum Modules
    Replies: 7
    Last Post: 06-26-2014, 10:03 PM
  2. Time out function in access?
    By ayupchap in forum Access
    Replies: 2
    Last Post: 02-05-2014, 12:10 PM
  3. Using the Nz function (Access 07)
    By jonny3000 in forum Access
    Replies: 5
    Last Post: 11-15-2012, 12:46 PM
  4. function in access
    By ali zaib in forum Access
    Replies: 3
    Last Post: 01-14-2012, 01:09 PM
  5. Help with Access - IIf Function
    By cs93 in forum Programming
    Replies: 7
    Last Post: 03-19-2011, 11:52 AM

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