Why can't I run this query when others can???

R

Richard Albrecht

Hi,

I've been going mad trying to figure out why this query will work on some
one else's Access 2k but not mine!

SELECT tblMembership.*
FROM tblMembership
Where tblMembership.[Valid To]>=DateSerial(Year(Date()), Month(Date()), 1)
AND tblMembership.[Valid To] <DateSerial(Year(Date()),
Month(Date()) + 3, 1);

Replace the table name with any table that has a date field (Valid To) in my
case.

When I run this I get a compiler error. I have downloaded all the latest
service packs to no avail.

Anybody got an idea???

Thanks
Rich
 
J

John Vinson

Anybody got an idea???
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.
 
R

Richard Albrecht

I tried that. Nothing was missing, I unchecked what it would allow me and
closed Access, relaunched then rechecked them, closed it and started it up
again...

Still getting Compiler error.
 
R

Richard Albrecht

The access program acually has nothing in it yet. It's going against linked
tables in another access data base. The idea is to keep it all seperate.

I will compact the database that has the tables and post the result.
 
G

Glen Appleton

If this will compile on another machine, and not yours, then some other
supporting library on the PC may be corrupt. What reference libraries are
you using in this project?

- Glen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top