pdvsa
asked on
Saved Import - assign to a button
Experts, how can I call up a saved import through an event on a forms button?
I have to do this manually and want to assign this saved task to a button.
thank you
I have to do this manually and want to assign this saved task to a button.
thank you
In the click event of the button, add the DoCmd.Transfer????, reference your saved import spec.
use this command
DoCmd.RunSavedImportExport "Name Of SavedImportExport"
DoCmd.RunSavedImportExport
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Although it seems that the RunSavedImportExport method is easier, keep in mind that you have no way to change it at run time. So for example, if you are doing an export and you want to include the date as part of the file name, you can't do that with RunSavedImportExport. You have to use the Transfer... method so you can include a different file name each time you export.
Also, the RunSavedImportExport is more fragile. I just changed the code one of my clients wrote to use the TransferText because he doesn't have any control over the file he is receiving and the maker added two new columns. The TransferText method (if you are importing a .csv file) doesn't fail.
Also, the RunSavedImportExport is more fragile. I just changed the code one of my clients wrote to use the TransferText because he doesn't have any control over the file he is receiving and the maker added two new columns. The TransferText method (if you are importing a .csv file) doesn't fail.
ASKER
Thank you. Sorry for my tardy reply....