By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,470 Members | 1,663 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,470 IT Pros & Developers. It's quick & easy.

"Data Type Mismatch" when opening Report

100+
P: 114
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.
Feb 7 '08 #1
Share this Question
Share on Google+
3 Replies


100+
P: 114
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.

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.
Feb 7 '08 #2

100+
P: 114
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
Feb 8 '08 #3

100+
P: 114
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.
Feb 11 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.