G
Guest
Ok, from reading all through Google, I know you can't run VBA in the
background while other code runs, so I need some help with the direction to
go for a workaround. I have a system that automatically will update the
"front end's" of my database whenever it is outdated and the user logs in.
The process works basically. I have code that when it detects an older
version, it will open another database, and shut down the active one. With
this other database, first it will delete the current front end, then it will
go to the computer where the backend is stored (as well as the new front end,
in a specific location). It takes the new front end using:
FileCopy SourceFile, DestFile
It copies the new front end into where the old front end was.
All this works, but I am trying to use the timer ever on the form to make a
progress bar so the user knows how much time is left, I do this by checking
the file size of the new front end and then based on a basic transfer rate, I
calculate time.
The obvious problem is that as soon as the cody starts the copy and paste,
it hangs there and the form timer doesn't go. So the countdown of time
remaining doesn't work. As soon as the file is completly copied, the time
goes straight to 0 and the program finishes. When an update can take 15
minutes, I would really like to let people know how much time they have left.
I realize this is a problem, and I am willing to do the work to make
something that will work, I just don't have the slightest idea which way to
start. I could really use some help just getting moved forward on this one.
Thanks,
James Stephens
background while other code runs, so I need some help with the direction to
go for a workaround. I have a system that automatically will update the
"front end's" of my database whenever it is outdated and the user logs in.
The process works basically. I have code that when it detects an older
version, it will open another database, and shut down the active one. With
this other database, first it will delete the current front end, then it will
go to the computer where the backend is stored (as well as the new front end,
in a specific location). It takes the new front end using:
FileCopy SourceFile, DestFile
It copies the new front end into where the old front end was.
All this works, but I am trying to use the timer ever on the form to make a
progress bar so the user knows how much time is left, I do this by checking
the file size of the new front end and then based on a basic transfer rate, I
calculate time.
The obvious problem is that as soon as the cody starts the copy and paste,
it hangs there and the form timer doesn't go. So the countdown of time
remaining doesn't work. As soon as the file is completly copied, the time
goes straight to 0 and the program finishes. When an update can take 15
minutes, I would really like to let people know how much time they have left.
I realize this is a problem, and I am willing to do the work to make
something that will work, I just don't have the slightest idea which way to
start. I could really use some help just getting moved forward on this one.
Thanks,
James Stephens