Hello-
I want to set the tabledef to current table. How can I do this? I use the following code, but gives me error. Can you please let me know ?
I appreciate your help very much. Thanks.
Function Test_Attachment(cFileName As String, cElement As String) As String
On Error GoTo Err_Test_Attachment
Dim MyWorkspace As Workspace, MyDataBase As Database
Dim MyTableDef As TableDef, cTableName As Database
Test_Attachment = "0"
Set MyWorkspace = DBEngine.Workspaces(0) ' Get default workspace.
Set MyDataBase = MyWorkspace.Databases(0) ' Get current database.
MyDataBase.TableDefs.Refresh
Set MyTableDef = MyDataBase(cFileName) ' Get current table /I get error here
Santosh
I want to set the tabledef to current table. How can I do this? I use the following code, but gives me error. Can you please let me know ?
I appreciate your help very much. Thanks.
Function Test_Attachment(cFileName As String, cElement As String) As String
On Error GoTo Err_Test_Attachment
Dim MyWorkspace As Workspace, MyDataBase As Database
Dim MyTableDef As TableDef, cTableName As Database
Test_Attachment = "0"
Set MyWorkspace = DBEngine.Workspaces(0) ' Get default workspace.
Set MyDataBase = MyWorkspace.Databases(0) ' Get current database.
MyDataBase.TableDefs.Refresh
Set MyTableDef = MyDataBase(cFileName) ' Get current table /I get error here
Santosh