Fast error-handling and Form_Laod-Event

  • Thread starter Thread starter juvi
  • Start date Start date
J

juvi

Hello,

I am new to access-vba and I have got the following problem.

In the Form_Load()-Event my DB trys to import CSVs from a Remote Location.

If there is no connection it freeze for about 30sec and then the
error-handler becomes active. Is there a way to fire the error handler
earlier if there is no conn. to the Remote-Folder?

If it is not possible then it should at least show me the Form to can see
something during waiting. I tried it with Form_Load, Form_Current,
Form_Active but the same result. The VBA code is working in background while
actually not seeing the Form.

Would be pleased about a reply or help.

Thank you
juvi
 
Juvi,
you could put a button on the form. When you click the button the db trys to
import the csv's.

Jeanette Cunningham
 
Thanks for your reply. OK..this would solve the Form appearance problem.

But is there no way to wait with the import-progress/VBA-ActionCode until
the form is really open+painted+and visible?

It would be also ok if I would see something like a Text "Synchronizing"
during import. Now you can only see the importprogressbar in the statusbar
left. As I know the guys who should work with this they will ignore this
progressbar and will think that the app freezes ;-)

The error-handling time is now a little bit shorter. I added a Server-Ping
function + If-Else condition.

Thank you again for your reply.

Balazs Sarreti
[juvi]
 
Balazs,
But is there no way to wait with the import-progress/VBA-ActionCode until
the form is really open+painted+and visible?
As far as I know, there is no way.
Maybe you could open a separate form first in acDialog mode.
The first form would have a message on it that says Synchronizing.
It would have a timer function on it and would open the form that does the
importing in hidden mode.

Jeanette Cunningham


juvi said:
Thanks for your reply. OK..this would solve the Form appearance problem.

But is there no way to wait with the import-progress/VBA-ActionCode until
the form is really open+painted+and visible?

It would be also ok if I would see something like a Text "Synchronizing"
during import. Now you can only see the importprogressbar in the statusbar
left. As I know the guys who should work with this they will ignore this
progressbar and will think that the app freezes ;-)

The error-handling time is now a little bit shorter. I added a Server-Ping
function + If-Else condition.

Thank you again for your reply.

Balazs Sarreti
[juvi]

Jeanette Cunningham said:
Juvi,
you could put a button on the form. When you click the button the db trys
to
import the csv's.

Jeanette Cunningham
 
Back
Top