[AccessD] Code to open table fails

Kaup, Chester Chester_Kaup at kindermorgan.com
Tue Jun 7 09:22:19 CDT 2005


Needed DAO reference. Thanks!

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bobby Heid
Sent: Tuesday, June 07, 2005 9:15 AM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Code to open table fails

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

-- 
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