Results 1 to 2 of 2
  1. #1
    CyberSkillsz is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2011
    Posts
    1

    datatype mismatch in criteria expression

    Hi everyone,

    I hope you can help me.

    I have a simple database with the following layout:

    Table - T_TrafficLog (Main Table)
    Row - TimeInOut

    Table - T_TimeInOut
    Row - In
    Row - Out

    I tried using the following SQL Query to pull a total count of In and a total count of Out seperately which is shown on a Report.

    SELECT Count(T_TrafficLog.TimeInOut) AS CountOfTimeInOut
    FROM T_TrafficLog


    WHERE (((T_TrafficLog.TimeInOut)="In"));


    and

    SELECT Count(T_TrafficLog.TimeInOut) AS CountOfTimeInOut
    FROM T_TrafficLog
    WHERE (((T_TrafficLog.TimeInOut)="In"));

    Can you please let me know how I can get the total In and Out count.

    Thank you,
    Jonathan

  2. #2
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    Welcome to the forum!

    I'm a little confused about your tables. You have 2 tables

    T_TrafficLog (Main Table)
    -TimeInOut

    T_TimeInOut
    -In
    -Out

    Is TimeInOut of T_TrafficLog a field? Are In and Out of T_TimeInOut also fields. What are the data types of each field?

    How are the two tables related?

    Can you provide some examples of typical data in each table?

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

Similar Threads

  1. Replies: 2
    Last Post: 05-17-2011, 02:40 PM
  2. Data type mismatch in criteria expression
    By Douglasrac in forum Forms
    Replies: 3
    Last Post: 11-23-2010, 10:46 AM
  3. type mismatch in expression
    By lilg1924 in forum Database Design
    Replies: 3
    Last Post: 10-06-2010, 01:37 AM
  4. data type mismatch in criteria expression
    By broecher in forum Access
    Replies: 4
    Last Post: 09-10-2010, 08:29 AM
  5. Data type mismatch in criteria expression
    By shexe in forum Queries
    Replies: 2
    Last Post: 09-01-2010, 12:47 PM

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