"Data Type Mismatch" when opening Report

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • martin DH
    New Member
    • Feb 2007
    • 114

    "Data Type Mismatch" when opening Report

    I would definitely appreciate any help with this problem as soon as possible. Thanks!

    I have a report that should display the results of a query based on two tables (tblClient and tblResult, linked by ClientID).

    When trying to open the report I receive the following error: "Data Type Mismatch in Criteria Expression"

    The report worked before, so as an experiment I created a new table with a structure identical to tblResult (so I think). The data within is the only difference(it's actually the data that was in the table when I built the report). The report opens fine with this table.

    So, my problem is why an error for one table and perfect operation for a splitting image? I've checked the fields, the data types, and the general table attributes - both tblResult's appear to be the same, yet one leads to an error and one leads to a report.

    Thanks in advance.
  • martin DH
    New Member
    • Feb 2007
    • 114

    #2
    UPDATE: The cause of the error message is because I had several textboxes taking the average of certain fields from tblResults that are actually Text datatypes. BUT, my problem still exists - using one table as source, the report opens (with the averages calculating correctly), using another seemingly identical table, I get an error due to the average textboxes.

    Originally posted by martin DH
    I would definitely appreciate any help with this problem as soon as possible. Thanks!

    I have a report that should display the results of a query based on two tables (tblClient and tblResult, linked by ClientID).

    When trying to open the report I receive the following error: "Data Type Mismatch in Criteria Expression"

    The report worked before, so as an experiment I created a new table with a structure identical to tblResult (so I think). The data within is the only difference(it's actually the data that was in the table when I built the report). The report opens fine with this table.

    So, my problem is why an error for one table and perfect operation for a splitting image? I've checked the fields, the data types, and the general table attributes - both tblResult's appear to be the same, yet one leads to an error and one leads to a report.

    Thanks in advance.

    Comment

    • martin DH
      New Member
      • Feb 2007
      • 114

      #3
      To help clarify, here's what's going on:

      1) I have an Excel spreadsheet with survey results data, some of which is "number stored as text" (responses are 1-5, N/A).
      2) I imported this to Access as a new table (tblResults), then built the report I mentioned above.
      3) The report opens fine.
      4) I get a spreadsheet with new data but exact same format.
      5) I imported this to Access as a new table (tblResults) to replace the old one.
      6) The report doesn't open (giving a "Data Type Mismatch in Criteria Expression" error).
      7) If I delete the textboxes taking the AVG of those fields whose data was "numbers stored as text" in Excel, the report opens.
      8) Reimporting my original spreadsheet (old data) as tblResults, the report opens without having to delete the textboxes taking the AVG
      9) I want to open the report with the textboxes taking the AVG!

      Thanks, Martin

      Comment

      • martin DH
        New Member
        • Feb 2007
        • 114

        #4
        Problem solved.

        The problem was due to the fact that my data had some null values and the functions I was using as control sources weren't set up to handle nulls.

        Sometimes, it's the simple things in life.

        Comment

        Working...