Hello. I have a database that I periodically requires some updates to either a form, a query, etc.
The db is used in different offices and to avoid other users to open the program in design view and cause problems, I was thinking of using the transfer object method. For this reason I have created a form with a cmb button that has the following code which I have found on the web and works fine:
Code example to transfer and replace existing object with same name:
"DoCmd.TransferDatabase acExport, "Microsoft Access", "c:\Mydb.accdb", acQuery, "qrytestA", "qrytestA", False
Code example to transfer and replace existing object and change its name:
"DoCmd.TransferDatabase acExport, "Microsoft Access", "c:\Mydb.accdb", acQuery, "qrytestA", "qrytestB", False
To make the transfer object method easier, I was thinking of adding to the form the following:
- A listbox to list the objects to transfer (my problem would be how to change the row source depending on the type of object, query, table, form)
- A textbox with the name (or new name) I want to give the the object to transfer
- A text box indicating the path of the db where to transfer the object
- Correct the above transferdatabase code
I appreciate any assistance you can give me with this.
Thank you
The db is used in different offices and to avoid other users to open the program in design view and cause problems, I was thinking of using the transfer object method. For this reason I have created a form with a cmb button that has the following code which I have found on the web and works fine:
Code example to transfer and replace existing object with same name:
"DoCmd.TransferDatabase acExport, "Microsoft Access", "c:\Mydb.accdb", acQuery, "qrytestA", "qrytestA", False
Code example to transfer and replace existing object and change its name:
"DoCmd.TransferDatabase acExport, "Microsoft Access", "c:\Mydb.accdb", acQuery, "qrytestA", "qrytestB", False
To make the transfer object method easier, I was thinking of adding to the form the following:
- A listbox to list the objects to transfer (my problem would be how to change the row source depending on the type of object, query, table, form)
- A textbox with the name (or new name) I want to give the the object to transfer
- A text box indicating the path of the db where to transfer the object
- Correct the above transferdatabase code
I appreciate any assistance you can give me with this.
Thank you