解决MS Access 2010中的导入问题 [英] Solve an import problem in MS access 2010
问题描述
我对仪器生成的日志文件有一些精心设计的导入方案。原始结构和文件命名是Access Unfriendly。我的过程包括,复制和重命名一组10个文件,将10个文件附加到单个文件中,然后将其复制到导入位置,撤消原始格式的大部分,然后导入到Access 2010.我已经解决了每个步骤单独测试所有功能步骤。如果我以单步模式运行宏,一切都按预期运行,但是当我让它从头到尾运行时,它会跳过append / copy / overwrite函数并再次加载以前导入的文件。最终结果是导入已被去格式化两次并因此被破坏。所有外观都是文件追加/复制功能在导入启动之前无法完成。有没有办法在下次运行之前强制/验证一个子的完成?
可以使用表单计时器提供喘息空间?
我尝试过:
我尝试插入解决其他问题的潜艇,以便有时间追加和复制目标文件。单步执行宏时,我已经确认了所需的结果。
在vba中有一个名为do events的命令
查找一下
I have a somewhat elaborate import scheme for an instrument generated log file. Original structure and file naming are Access Unfriendly. My process involves, copying and renaming a set of 10 files, appending the 10 files a into a single file which is then copied to the import location, undoing a substantial portion of the original formatting, then importing to Access 2010. I have worked out each step individually and tested all steps for functionality. If I run the macro in single-step mode, everything functions as intended, but when I just let it run from start to finish, it skips the append/copy/overwrite function and loads the previously imported file again. The end result is an import that has been "de-formatted" twice and therefore corrupted. All appearances are that the file append/copy function fails to complete before the import kicks in. Is there a way to force/verify completion of one sub before the next runs?
Could a form timer be used to provide breathing room?
What I have tried:
I have tried inserting subs that address other issues along the way, in order to allow time for appending and copying of the target file. I have confirmed the desired result when single stepping through the macro.
in vba there is a command called do events
look that up
这篇关于解决MS Access 2010中的导入问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!