[AccessD] Code to open table fails

Heenan, Lambert Lambert.Heenan at AIG.com
Tue Jun 7 09:21:42 CDT 2005


Could it be as simple as the spaces in the table name? Have you tried...

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

...?

Lambert

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