More likely the ONLY reference set in the other programs is DAO. Whereas
you probably have a reference set to BOTH DAO and ADO in this program. The
confusing thing is that both DAO and ADO have a Recordset object. If your
ADO reference comes first in the list, a recordset declared without a prefix
will become an ADO recordset. But then you try to stuff a DAO recordset
into it, hence the Type-Mismatch.
--
--Roger Carlson
MS Access MVP
Access Database Samples:
www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
Scott Burke said:
OK... I have written many of code that does NOT have the DAO. prefix.
But in this case adding the DAO. makes it work.
My guess is that a Reference is set in the other programs but that reference
is not set in this program??
Have the default "Active" reference changed since Access97?
Scott Burke
Hey John. Your ideal did not work. Access tried to use the "[]" as part of
the table name.
Ofer said:
Try to fefine the Dao first
dim db as Dao.database
dim rs as Dao.recordset
set db = currentdb()
set rs = db.openrecordset("Import UMC")
--
\\// Live Long and Prosper \\//
BS"D
:
dim db as database
dim rs as recordset
set db = currentdb()
set rs = db.openrecordset("Import UMC")
The error happens here. "set rs = db.openrecordset("Import UMC")"
The "Import UMC" table exist.
It is empty.
Why is this a Type Mismatch (Run Time Error 13) ???????
Scott Burke