This article was previously published under Q200592
Moderate: Requires basic macro, coding, and interoperability skills.
Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.
View products that this article applies to.
Sub CurrentDbSuccess()
Dim db As DAO.Database
Dim td As DAO.TableDef
Set db = CurrentDb()
Set td = db.TableDefs("Customers")
MsgBox td.Name
End Sub
CurrentDbSuccess
Sub CurrentDbFail()
Dim td As DAO.TableDef
Set td = CurrentDb.TableDefs("Customers")
MsgBox td.Name
End Sub
CurrentDbFail
Keywords: KB200592, kbprb, kbprogramming