niklas
06-25-2004, 06:01 AM
Hey - need some help...
Have two databases in use, one to store the necessary data, one with user-interface to manage the data. The user-interface keeps only linked tables of the data-db.
It is possible to create new tables in the data-db by running code in the user-interface like:
DoCmd.CopyObject path&name_data-db, table_name, acTable, smple-table_name
It is possibel do create in the user-interface a new link to the table in the data-db by running code in the user-interface like:
set currdbs = CurrentDB
Set tdf = currdbs.CreateTableDef(table_name)
tdf.Connect = ";DATABASE=" & path&name_data-db
tdf.SourceTableName = table_name
currdbs.TableDefs.Append tdf
It is possible for me to delete that link in the user-interface when the new table will not be used anymore, but it is impossible to delete the table in the data-db by running code in the user-interface. I tried code like:
Set dbs = OpenDatabase(path&name_data-db, , False)
DoCmd.DeleteObject acTable, path&name_data-db&table_name
Error message is: Access canīt find the objekt... think I try to delete the table in the user-interface again - not in the data-db
Any help?
Have two databases in use, one to store the necessary data, one with user-interface to manage the data. The user-interface keeps only linked tables of the data-db.
It is possible to create new tables in the data-db by running code in the user-interface like:
DoCmd.CopyObject path&name_data-db, table_name, acTable, smple-table_name
It is possibel do create in the user-interface a new link to the table in the data-db by running code in the user-interface like:
set currdbs = CurrentDB
Set tdf = currdbs.CreateTableDef(table_name)
tdf.Connect = ";DATABASE=" & path&name_data-db
tdf.SourceTableName = table_name
currdbs.TableDefs.Append tdf
It is possible for me to delete that link in the user-interface when the new table will not be used anymore, but it is impossible to delete the table in the data-db by running code in the user-interface. I tried code like:
Set dbs = OpenDatabase(path&name_data-db, , False)
DoCmd.DeleteObject acTable, path&name_data-db&table_name
Error message is: Access canīt find the objekt... think I try to delete the table in the user-interface again - not in the data-db
Any help?