473,490 Members | 2,635 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

"Data Type Mismatch" when opening Report

114 New Member
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
3 6761
martin DH
114 New Member
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
martin DH
114 New Member
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
martin DH
114 New Member
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

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

Similar topics

3
3152
by: mvargasp | last post by:
Hi all, I have a web form which contains a frame, (a form containing a menu on the left and a web form containing a datagrid on the right). Also there is a button (right side) which transforms...
3
4678
by: 21novembre | last post by:
Hi all, I made a question several days before to describe my strange trouble of mysqldump. But I still can't figour it out. Well, I just want to ask another question whether I could just backup...
0
3937
by: s_gregory | last post by:
The mdb is considerable size 70 +- mb. A complex union query was working well, but when an additional union select... was added into the query, selecting identical fields from a different source,...
1
2250
by: RWC | last post by:
Hello, I'm getting the error "The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data" when I run a report. I'm simply trying to apply the...
2
1896
by: David Reynolds | last post by:
Hi Everybody, I have a vb.net webform where I create the Excel application/workbook/worksheet. On Windows 2000 server for some reason, I keep getting an error("Bad variable type") when trying...
1
4577
by: rharding | last post by:
I have a SQL database which contains a table (TblA) with a field (Fld1) defined as "bigint". When the SQL table is linked to Access the design view of the linked table shows this field as a data type...
1
3511
by: jmarr02s | last post by:
I am using MS Access 2003 and get the following error "Data type mismatch in criteria expression" Any suggestions on how to fix this? This is my code: SELECT IIf(=15 Or =19, "15 og 19",...
5
4357
by: Davros9 | last post by:
Trying to get Regular Expressions working....... ---------------- Public Function SepString(InField As String) As String ''seperates on space and comma Dim RE As New RegExp Dim Matches As...
10
4527
by: dstorms | last post by:
Hi, I'm trying to create a button on a form that: 1. Takes the ComputerID from the form linked to Table 1, 2. Checks Table 2 for a matching ComputerID, and 3. Opens the query qryEditData, and...
0
7112
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6974
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7146
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7356
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5448
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4878
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
1389
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
628
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
277
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.