Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Aug 2008
    Location
    Daytona Beach, Florida, USA
    Posts
    42
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Within a payroll database, I have employees that make a different rate if they work the night shift, so I thought I could have an IIf statement that would give me the night rate if they time out at 6 am otherwise give the reg rate. But when I use the statement below in my query it gives me a "Data type mismatch in criteria expression" error message.

    Expr1: IIf([TIME OUT]="06:00 ,[Night Rate],[OvrdRate])

    The data type for time out is Date/Time and there is a input mask of 00:00;0;_

  2. #2
    5 Star Lounger AndrewKKWalker's Avatar
    Join Date
    Apr 2001
    Location
    Cambridge, UK
    Posts
    1,020
    Thanks
    0
    Thanked 3 Times in 3 Posts
    TRY

    IIf([TIME OUT]=TimeValue("06:00") ,[Night Rate],[OvrdRate])
    Andrew

  3. #3
    Star Lounger
    Join Date
    Dec 2009
    Location
    Bellevue, WA
    Posts
    61
    Thanks
    1
    Thanked 0 Times in 0 Posts
    [Time Out] is date/time. "06:00" is a string. That is why you get the error message.

Posting Permissions

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