Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2015

    Unanswered: not sure why function isn't working

    I have a simple form with three fields, route, time and IdCode. (all from some table)

    The first two fields route and time the user fills in. The last field, IDcode, is calculated by those two.

    Here is my function for the IDcode field.

    =IIf(Eval([Route] In ("1") And [time] In ("Between #5:50# and #7:09#")),"010","none")

    WHen the user enters 1 for route, and lets say 6:00 for time, it gives the "none" when it should give "010".

    what am i doing wrong?

  2. #2
    Join Date
    Mar 2009
    Provided Answers: 15
    The argument of an EVal function must be a string. You then have to concatenate the various parts of that string. I would try:
    = IIf(Eval("'" & [Route] & "'" & " IN ('1') AND #" & [Time] & "# BETWEEN #5:50# AND #7:09#"), "010", "none")
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts