K
kev100 via AccessMonster.com
I'm having a TOUGH time trying to get this going...
And what makes it so aggravating is that I'm sure it's something simple.....
I'm just not familiar enough with Access VBA, Modules, etc to do it.
After lots of reading on this board......it looks like the SHELL command is
what's needed.....but I can't figure out exactly how to implement it so that
it will execute when clicking a button on a form.
I'm needing to copy all the files in a specfic directory to another
directory.
All paths are static....the only variable will be the Name of the source
directory. The name of that given source directory is displayed in a text
box on the form.
This is the command that I think should do it:
Shell ("xcopy c:\MainDirectory\"& [forms]![MyForm]![DirTextBox] & "\*.* /s /y
C:\TargetDir")
However....I don't know WHERE / HOW to put/create this command (in a Macro...
in a Module...other...?) so that it can be activated by clicking a button on
the form.
I'm sure that must be really basic process...but I can't some to get things
going.
Any help appreciated.
Thanks
And what makes it so aggravating is that I'm sure it's something simple.....
I'm just not familiar enough with Access VBA, Modules, etc to do it.
After lots of reading on this board......it looks like the SHELL command is
what's needed.....but I can't figure out exactly how to implement it so that
it will execute when clicking a button on a form.
I'm needing to copy all the files in a specfic directory to another
directory.
All paths are static....the only variable will be the Name of the source
directory. The name of that given source directory is displayed in a text
box on the form.
This is the command that I think should do it:
Shell ("xcopy c:\MainDirectory\"& [forms]![MyForm]![DirTextBox] & "\*.* /s /y
C:\TargetDir")
However....I don't know WHERE / HOW to put/create this command (in a Macro...
in a Module...other...?) so that it can be activated by clicking a button on
the form.
I'm sure that must be really basic process...but I can't some to get things
going.
Any help appreciated.
Thanks