Confirmation Indication

Knildon

Learning by Default
Local time
Today, 14:48
Joined
Jan 19, 2012
Messages
89
Hello everyone,
After a long time off from programming, I decided to finish the program I started many moons ago and as usual I need help from you to get it done.
My program requires a download from the internet which, at times, could take a little longer than other times. One of my complaints about programs that I have used in the past is that when I click the "action" button I get no response back and don't know whether the program is working or not. I would like to avoid that feeling when my program is running a little slower than normal.
With all that said, I would like to have a message that blinks(slowly) or an animated bar with dots or something moving across the bar while the download takes place. I've searched the forum and found some possibilities that may work but I'm not sure how to convert them. What I really need is some code to do this and I need to know how to turn the indication on and then off when the download is complete.
As I have said in the past, 73 still learning and enjoying it.
Thanks for any help you can give. ;)
Don
 
Many ways to accomplish this. Here is one example: Of course change timer to suit your needs. You could also use a scrolling Marquee!

Private Sub Form_Open(Cancel As Integer)

Me.Dirty = False
'Set the Form's Timer to 1 second intervals (1000 tics = 1 Second)
Me.TimerInterval = 1000
End Sub


Private Sub Form_Unload(Cancel As Integer)
'When the Form closes or is put into Design view
'then Zero the Form's TimerInteval. If you don't
'it can cause some strange things to happen.
Me.TimerInterval = 0
End Sub


Private Sub Form_Timer()
'Increment the TimerCount variable by 1
TimeCount = TimeCount + 1
'Display the current seconds remaining in the
'small Label control located in the upper right
'corner of the Form.
Me.Cnter.Caption = 4 - TimeCount
'If the Seconds Counter (TimerCount) is now equal
'to 10 seconds then Close the Popup Form.
If TimeCount = 4 Then
DoCmd.Close

End If
End Sub

Timer Interval 1000
 
burrina,
Thank you for the reply but I can't get this to work the way I would like it to. The "Me.Dirty = False" step gives an error message. When I comment it out I can only get the program to count to a preset counter number and then it stops. It also doesn't have any visual indicator to show that it is working.
I need something that starts when a download begins and stops when the download is complete with some type of active visual indication between the start download and download complete.
Any other suggestions.
Don
 
What your asking really can't be done. What if the download takes 30 seconds, 35 seconds? No way of knowing! You can Only flash a message for a set amount of time. I probably would kick out all of the users and show a message that an upgrade is being performed and not allow them back in until complete.


Good Luck!
 
burrina,
I don't mean to sound [FONT=&quot]derogatory but those words, "can't be done", aren't in my vocabulary. I worked most of my life writing programs so machines and equipment would do all those crazy things they do to make products, etc. for use by whom ever may need them. There was always someone who said that can't be done but it could.
That was easier programming than writing a VBA program for Access
The reason I say that is because I don't understand what actions can happen simultaneously in VBA. Does it allow one function to operate while another is being processed? I guess once I get that straight in my head I'll be able to figure out how to do some of this stuff on my own.
Thanks for your help.
If you come up with anything, let me know.
Don :confused:
[/FONT]
 
Don,

Access is single thread so it really is doing one thing at a time.
One technique that works to show you things are working is to use MsgBox or Debug.print statements to give messages at certain points.

Debug print writes to the immediate window. It can wirte any message with a time stamp based on your criteria.

For example, if you are reading a recordset, you could have it Debug.print something every 100th record or whatever meets your need.

If you use MsgBox it requires you to click a button to continue.

Good luck.
 
jdraw,
Thanks for the reply and the lesson about Access. I guess I'm accustomed to working with programs that can do multitasking and can process more than one task at the same time. Most all programs I've worked with drop down through the logic and complete it step by step but they also check on "sub programs" and complete those tasks also.
Since I'm retired, I think I'll waste some time to see if I can find a solution to my "impossible" requirement.
I probably don't know enough about the Access VBA commands to solve this problem but then again sometimes a simple solution is the best!!
I will also try your suggestions to see if I can incorporate one of them into my program.
Any other thoughts on this subject would be appreciated. (From anyone)
Don :)
 
..
My program requires a download from the internet which, at times, could take a little longer than other times....
Do you use a browser to get the data?
If yes have you looked at the browser's "ReadyState"?
 
JHB,
It's not the speed of the download that I am concerned with. One of the sites I am downloading from can take 10 minutes and even up to 30 minutes if you get on it the wrong day of the week. My concern is to inform people that the program is actually working and not locked up.
Thanks for your reply.
Don
 
... My concern is to inform people that the program is actually working and not locked up.
Thanks for your reply.
Don
Then use a loop and check if all data is received (ReadyState = READYSTATE_COMPLETE) and some code to update the status bar.
Code:
Do
  DoEvents
  'Some code for status bar  
Loop Until ie.ReadyState = READYSTATE_COMPLETE
 
jdraw and JHB,
Sorry for the delay in my response. I went out of town and was gone longer than expected.
I didn't get a chance to try your suggestions but I will and if I have a problem I will report back.
Thanks again for your response and help.
Don :)
 

Users who are viewing this thread

Back
Top Bottom