Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / March 2008

Tip: Looking for answers? Try searching our database.

Fast error-handling and Form_Laod-Event

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
juvi - 05 Mar 2008 09:00 GMT
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
Jeanette Cunningham - 05 Mar 2008 10:26 GMT
Juvi,
you could put a button on the form. When you click the button the db trys to
import the csv's.

Jeanette Cunningham

> Hello,
>
[quoted text clipped - 16 lines]
> Thank you
> juvi
juvi - 05 Mar 2008 10:54 GMT
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]

> Juvi,
> you could put a button on the form. When you click the button the db trys to
[quoted text clipped - 22 lines]
> > Thank you
> > juvi
Jeanette Cunningham - 05 Mar 2008 19:38 GMT
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

> Thanks for your reply. OK..this would solve the Form appearance problem.
>
[quoted text clipped - 43 lines]
>> > Thank you
>> > juvi
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.