I made function which use do while(true) - infinite loop (which controls other apps)
I am searching solution how to make form accessable - when I start app, access just loading and my form cannot be changed. At least I tried to make some "listening function" for key "S" to stop while and it doesnt work too (maybe I am doing it bad, is it possible?)
I just used
Do While (run) <code> Loop
I guess I will need at least 2 thread (1 thread handle infinite while, 2 thread for form, but I read access cannot handle Multithreading.)
I can ask, is there some possibility of make this work?
Jan.
MS Access or MS office are single threaded platforms and cannot perform parallel executions. Generally, having a blind loop or uncontrolled loop is not a good practice at all. If you have a blind loop function without a controller, you are wasting process cycles of your vba application.
what you can do:
In short, VBA cannot perform threading. Using uncontrolled will freeze your application which will force you to use [CTRL] + F12 to stop the execution manually.
我使用了函数“ DoEvents” (至少对输入有反应-键盘/鼠标)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.