The help file in Access doesn't explain very well what DoEvents does for me. I'm still working on the problem of slow networking problems
One of the programs I have is designed to access info just like what my program does over a network. I don't understand why my program runs slower than the other one does when more than 1 person views data so I'm trying to "pick apart" the code of the program that does work. It almost seems like they copy all the data at the beginning (it takes longer to initially load), and then keep it in queue for easy access...
The only thing I see them doing though is when the program is loaded, it checks to see if the data is correctly attached. If not, it loads a form that requires users to enter the location of a valid data file. While this form is open, they are running DoEvents with a loop statement:
Call ChkAttach(True)
If isloaded("Attach Tables" Then
Do While isloaded("Attach Tables"
DoEvents
Loop
End If
One of the other strange things that I would appreciate if it could be explained better is the CLASS MODULES
Right after the loop above, they have:
BUS.Class_Initialize
They do this BEFORE running any functions in the program. Could this make each function run quicker? Why put functions in a Class Module instead of a Module...what is the difference?
Thanks in advance for the help, I'm sure I'll figure out how to get this program working faster sooner or later.
One of the programs I have is designed to access info just like what my program does over a network. I don't understand why my program runs slower than the other one does when more than 1 person views data so I'm trying to "pick apart" the code of the program that does work. It almost seems like they copy all the data at the beginning (it takes longer to initially load), and then keep it in queue for easy access...
The only thing I see them doing though is when the program is loaded, it checks to see if the data is correctly attached. If not, it loads a form that requires users to enter the location of a valid data file. While this form is open, they are running DoEvents with a loop statement:
Call ChkAttach(True)
If isloaded("Attach Tables" Then
Do While isloaded("Attach Tables"
DoEvents
Loop
End If
One of the other strange things that I would appreciate if it could be explained better is the CLASS MODULES
Right after the loop above, they have:
BUS.Class_Initialize
They do this BEFORE running any functions in the program. Could this make each function run quicker? Why put functions in a Class Module instead of a Module...what is the difference?
Thanks in advance for the help, I'm sure I'll figure out how to get this program working faster sooner or later.