Tom Bolton
tom.bolton at donnslaw.co.uk
Mon Sep 19 08:41:19 CDT 2005
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 -------------- next part -------------- The contents of this message and any attachments are the property of Donns Solicitors and are intended for the confidential use of the named recipient only. They may be legally privileged and should not be communicated to, or relied upon, by any other party without our written consent. If you are not the addressee, please notify us immediately so that we can make arrangements for its return. You should not show this e-mail to any person or take copies as you may be committing a criminal or civil offence for which you may be liable. The statement and opinions expressed in this e-mail message are those of the writer, and do not necessarily represent that of Donns Solicitors. Although any files attached to this e-mail will have been checked with virus protection software prior to transmission, you should carry out your own virus check before opening any attachment. Donns Solicitors does not accept any liability for any damage or loss which may be caused by software viruses...