08. august 2003 - 22:47Der er
12 kommentarer og 1 løsning
Automatisk import af tabeller, formularer mv.
Ved brug af funktionen DoCmd.TransferDatabase acImport kan jeg importere en række tabeller, formularer mv. Jeg skal dog her kende navnet på det jeg ønsker at importerer.
Hvordan kan jeg importerer alle tabeller, rapporter, formularer, makroer mv. fra "db_update" til "db_old" uden at kende navnene på de enkelte (og uden at kende antallet af objekter der skal importeres)?
hi roose>can you tell me why you need to do this without knowing the object names? If you dont know the names then I assume that you want to import ALL objects and if that is the case then why not just copy the dB?
hi terry. The original database is very large - the update.mdb will contain new forms, reports etc. If I can copy update.mdb into the original database without overwriting the objects that needs no replacement it would be the easiest - but I actually would like to do it as I descirbed above.
However, I've managed to update the tables using the TableDefs - but there does not exist a "ReportDefs". That gives me trouble....
I need to get the names of the reports (and forms, and modules) in the update.mdb - but how ? In the original db I can use the "AllReports" but it only applies to the CurrentDB - can I change the CurrentDB to the update.mdb, get the names of the objects and then change the CurrentDB back ??
You can use automation to open the other dB and cycle through the objects. I have recently given an example of automating anothr Access dB. Will just see if I can find it.
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.