Data Mismatch Criteria Expression Error

  • Thread starter Thread starter Sondra
  • Start date Start date
S

Sondra

I have this criteria written in my query:

Week Ending: DateAdd("d",7-Weekday([DocumentDistDate]),
[DocumentDistDate])

It worked perfectly this morning. Now I am getting the
error. Any suggestions?

Sondra
 
I have this criteria written in my query:

Week Ending: DateAdd("d",7-Weekday([DocumentDistDate]),
[DocumentDistDate])

It worked perfectly this morning. Now I am getting the
error. Any suggestions?

Sondra

This appears to be the very common References bug. Open any
module in design view, or open the VBA editor by typing
Ctrl-G. Select Tools... References from the menu. One of the
..DLL files required by Access will probably be marked
MISSING. Uncheck it, recheck it, close and open Access.

If none are MISSING, check any reference; close and open
Access; then uncheck it again. This will force Access to
relink the libraries.

Another possibility is that a record in this afternoon's query -
unlike this morning's - contains a NULL value of DocumentDistDate.

John W. Vinson[MVP]
 
This appears to be the very common References bug. Open
any
module in design view, or open the VBA editor by typing
Ctrl-G. Select Tools... References from the menu. One of the
..DLL files required by Access will probably be marked
MISSING. Uncheck it, recheck it, close and open Access.

If none are MISSING, check any reference; close and open
Access; then uncheck it again. This will force Access to
relink the libraries.

Another possibility is that a record in this afternoon's query -
unlike this morning's - contains a NULL value of DocumentDistDate.

John W. Vinson[MVP]

Could this be affected by using the database on a
different computer???
 
This appears to be the very common References bug. Open
any
module in design view, or open the VBA editor by typing
Ctrl-G. Select Tools... References from the menu. One of the
..DLL files required by Access will probably be marked
MISSING. Uncheck it, recheck it, close and open Access.

If none are MISSING, check any reference; close and open
Access; then uncheck it again. This will force Access to
relink the libraries.

Another possibility is that a record in this afternoon's query -
unlike this morning's - contains a NULL value of DocumentDistDate.

John W. Vinson[MVP]

When I do as you have identified there are several files
whose check box is not marked. How do I identify the ones
that should be marked by Access?
 
When I do as you have identified there are several files
whose check box is not marked. How do I identify the ones
that should be marked by Access?

Well... which references are essential for Access? or which are
essential for your database?

The three that you MUST have are:

Visual Basic for Applications
Microsoft Access x.xx Object Library

and either

Microsoft DAO y.yy Object Library

or

Microsoft ActiveX Data Objects z.zz Object Library

x and y vary with the release of Access (x.xx = 10.00 for AccessXP for
instance; y.yy will be 3.6 for that release).

Your database may or may not have other libraries included to enable
"bells and whistles". Try unchecking them all (BACK UP THE DATABASE
FIRST!!!!) except these three (or if DAO and ActiveX are both checked
leave them both); test everything, and see what breaks.

My guess is that a lot of unneeded references were checked on the
development machine, and the problem is arising because the libraries
selected do not exist on the user machine. Removing the references or
installing the .DLL file will solve the problem; remove the reference
unless you are sure you *need* the functionality.

John W. Vinson[MVP]
 
Back
Top