How to resolve Error 3043 (Re-link all the tables automatically) (1 Viewer)

Khalid_Afridi

Registered User.
Local time
Today, 13:17
Joined
Jan 25, 2009
Messages
491
Hi, guys

I have a problem on a fe, be linked tables. I get Error 3043 whenever network disconnected. On fe application there is a module which fetches the network data every 60 seconds and have linked tables.

I want to re-link the interrupted tables automatically without closing the application to avoid the extra burden on users to close and re-open the application.

How can we resolve the issue for Error 3043 whenever network is available? (Re-link all the tables automatically)

Thanks in advance.
 

JHB

Have been here a while
Local time
Today, 12:17
Joined
Jun 17, 2012
Messages
7,732
You can not re linking tables when no network is available, it is not just a matter of waiting until the network is available again.
Why else would it help to close the database and reopen it?
But why is your network so unstable?
What I do not understand this phrase here, "On fe application there is a module which fetches the network data every 60 seconds and have linked tables", what is the module do, does it check if network is available?
 

Khalid_Afridi

Registered User.
Local time
Today, 13:17
Joined
Jan 25, 2009
Messages
491
Thanks JHB,
My DB is connected to several applications (around 5) and more than 100 users each for different type of application. The company has a huge network, sometime it is overloaded and it get interrupts and disconnects.
There is a module on each application which trig every 60 seconds timer to get the information whether user has send a message OR if there is any location request to approve by the admin OR is there any overdue Employee's leave to be updated in the System. The admin will get a notification on his panel and will show the numbers of requests/messages. He then can approve / disapprove the same. Another purpose is to kick out (log out) all or some of the users to close the specific application for maintenance. (this is all administrative kind of work)

I want to have a code which checks every 30 OR 60 seconds if there is an Error Number 3044 OR 3043 occurs... fire it and re-connect the linked tables so users and as well as admin would not force to log out.

Any help will be highly appreciated.
 

JHB

Have been here a while
Local time
Today, 12:17
Joined
Jun 17, 2012
Messages
7,732
I don't know if the below code can help you.

Code:
Sub DB_RefreshLink()
  On Error GoTo NoNetwork
  Dim dbs As Database
  Dim db_Tabledef As TableDef
  
  Set dbs = CurrentDb
  For Each db_Tabledef In dbs.TableDefs
    If Not Left(db_Tabledef.Name, 4) = "MSys" And db_Tabledef.Connect <> "" Then '<>Systemfiles and not linkede tables
      db_Tabledef.RefreshLink
    End If
  Next db_Tabledef
  
  Exit Sub
NoNetwork:
  If Err.Number = 3043 Or Err.Number = 3044 Then
    'Insert some form of error handling, for example. wait 30 seconds and then try again.
    'Resume
  Else
    MsgBox (Err.Number & " " & Err.Description)
  End If
End Sub
 

DavidAtWork

Registered User.
Local time
Today, 11:17
Joined
Oct 25, 2011
Messages
699
Why don't you just wait till the error happens, use an On Error trap and if it is error 3043 or 3044 then try to reconnect the tables rather than just trying to reconnect every 30 secs

David
 

Khalid_Afridi

Registered User.
Local time
Today, 13:17
Joined
Jan 25, 2009
Messages
491
Why don't you just wait till the error happens, use an On Error trap and if it is error 3043 or 3044 then try to reconnect the tables rather than just trying to reconnect every 30 secs

David

Thanks JHB and David,

Yeah that what I need, I want to run the code whenever the errors 3043 or 3044 occur. The problem is I have so many modules and forms and I don't know by the time which form is or module is running by which application? there should be a common place which should be opened all the time to trap the error OR there should be a specific point to know where access throws the error 3043 and 3044?

The initial point is important to trap the error. (I think you understand what I mean)
 

jessetutt

New member
Local time
Today, 04:17
Joined
Mar 1, 2020
Messages
2
Another way of fixing this is on HP computers, right click on HP SureClick and disable it!
 

Users who are viewing this thread

Top Bottom