Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Type Mismatch 1

Status
Not open for further replies.

LarryDeLaruelle

Technical User
May 19, 2000
1,055
US
Situation: Access 97; Report has been working fine for months. Today when the user tried to run it she received this message:

Data type mismatch in criteria expression.

The error occurs as soon as the status bar shows the query running and one tick box displays.

Complex report based on several queries brought together with a master query. Checked each query all, including the master, work fine -- each opens with no error. Set a break point on the code in the report but it never triggers.

Did a compact and repair but did not fix the problem.

Created another report based on the master query, added a few fields, works fine.

Made a copy of the original, and began removing all code and calculated text boxes one at a time. Still receive the error when I strip out one item at a time.

If I strip out everything in one pass, it will run.

Have a backup copy of the database; ran the report from there and it worked fine. Imported the report to the db where the trouble is occuring and receive the same error.

Why will the report run in the back up copy but not the working copy of the db?

Any idea how I can identify the offending control/s?

Am I stuck with completely recreating the report?

Thanks.



Larry De Laruelle
ldelaruelle@familychildrenscenter.org

 
I expect that you have some data value that might be Null. In prior mdbs, there might not have been a null in the records. Are you filtering the records in the report in any way? I would try to filter down to just a few records and then increase the record range until you get the error message.

Duane
MS Access MVP
 
Duane:

Why didn't I think of that.

Don't know how it happened but someone had entered a record without a required field (not my db; its a legacy Access backend with a VB front end).

Thanks a bunch; I can now quit pulling out what little hair I have left.

Larry De Laruelle
ldelaruelle@familychildrenscenter.org

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top