Kaup, Chester
Chester_Kaup at kindermorgan.com
Mon Sep 19 08:55:40 CDT 2005
Thanks. That got it.
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tom Bolton
Sent: Monday, September 19, 2005 8:41 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Type mismatch error
Hi Chester
The first thing that springs to mind - when you declare your data
objects
(recordset etc.) try explicitly naming the types, as I notice you have
references set to both ADO and DAO.
Hence:
Dim MyDb As DAO.Database, myds1 As DAO.Recordset
Maybe this'll help?
Cheers
Tom
-----Original Message-----
From: Kaup, Chester [mailto:Chester_Kaup at kindermorgan.com]
Sent: 19-Sep-2005 14:25
To: Access Developers discussion and problem solving
Subject: [AccessD] Type mismatch error
The following code generates a type mismatch error when the table tries
to open. I am not seeing a problem since the code ran in another DB.
References are set for VB for Applications, MS Access 11.0 Object
Library, OLE Automation, Microsoft DAO 3.6 Object Library and Microsoft
Active X Data Objects 2.1 library. tbl Wells to Allocate is a native
access table. Thanks for the assistance
Function AllocationFactors()
Dim MyDb As Database, myds1 As Recordset
Set MyDb = CurrentDb()
Set myds1 = MyDb.OpenRecordset("tbl Wells to Allocate", dbOpenTable)
Chester Kaup
Engineering Technician
Kinder Morgan CO2 Company, LLP
Office (432) 688-3797
FAX (432) 688-3799
No trees were killed in the sending of this message. However a large
number of electrons were terribly inconvenienced.
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com