none
Correct expression? RRS feed

  • Question

  • I have three fields in a query; DteEmployed, PayDate, DteLeft. I feel dumb asking for an expression iif([DteEmployed]<=[Paydate]<=[DteLeft],1,0)
    Sunday, May 1, 2016 11:47 AM

Answers

  • You have to write it this way, using And:

    IIf([DteEmployed]<=[PayDate] And [PayDate]<=[DteLeft], 1, 0)


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    Sunday, May 1, 2016 11:54 AM
  • Is PayDate a field in either of the two tables in your query?

    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    Sunday, May 1, 2016 3:22 PM

All replies

  • You have to write it this way, using And:

    IIf([DteEmployed]<=[PayDate] And [PayDate]<=[DteLeft], 1, 0)


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    Sunday, May 1, 2016 11:54 AM
  • Sunday, May 1, 2016 2:01 PM
  • Thanks Hans I will visit your website just now. As you may see the expression works but I need to add a criteria of one and it then asks for Parameter value of Paydate.
    Sunday, May 1, 2016 2:03 PM
  • Is PayDate a field in either of the two tables in your query?

    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    Sunday, May 1, 2016 3:22 PM
  • I learnt this as well. As you may see on the insert it was Payday: Salarydte. When I changed it to the exact field name Salarydte the problem was fixed. Thanks.
    Monday, May 2, 2016 4:50 AM