[AccessD] Code to open table fails

Bobby Heid bheid at appdevgrp.com
Tue Jun 7 09:14:52 CDT 2005


What error message are you getting?  
Do you have a reference set to DAO instead of the default ADO?  
If you have a reference to both ADO and DAO, is the DAO first?

Bobby

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester
Sent: Tuesday, June 07, 2005 9:55 AM
To: accessd at databaseadvisors.com
Subject: [AccessD] Code to open table fails


I have used this code in many Access 2003 databases successfully. Just tried
it in a 2003 version database and it will not open the table. I have checked
and the table exists and name matched. I can open the table no problem from
the table list. What may be happening here?

 

Sub TableNames()

 

    Set MyDB = CurrentDb()

    Set AllTableDefs = MyDB.TableDefs

    Set myds = MyDB.OpenRecordset("tbl Table Definitions", dbOpenTable)

 

Chester Kaup

Engineering Technician

Kinder Morgan CO2 Company, LLP

Office (432) 688-3797

FAX (432) 688-3799

 

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list