Question network interrupted issue with MS Access 2007

shsh_shah

New member
Local time
Today, 23:07
Joined
Feb 10, 2009
Messages
2
I have an ms access application where i have front end and back end ... When i try to run a command on a specific form i get

" your network was interupted .To continue close and then open again "

I have front and backend running on same machine and in the same folder. I have a link manager button which basically link all tables to the front end.

Basically i am closing off the stock at the end of every month so here is the code that is in use:
Code:
Private Sub Command5_Click()
On Error GoTo Err_Command5_Click

    Dim stDocName As String

    stDocName = "Cl Closing 2 Opening Qry"
    DoCmd.OpenQuery stDocName, acNormal, acEdit
    
Exit_Command5_Click:
    Exit Sub

Err_Command5_Click:
    MsgBox Err.Description
    Resume Exit_Command5_Click
    
End Sub

And in the main form i added following:

Code:
Dim dbsAlwaysOpen As DAO.Database

Private Sub Form_Close()
    Set dbsAlwaysOpen = Nothing
 End Sub

Private Sub Form_Open(Cancel As Integer)
    Set dbsAlwaysOpen = OpenDatabase("H:\EnglishBiscuit\English Biscuits.mdb", False)
    End Sub

Any help please?:(
 
1. The frontend should not be on the server and should not be shared. It should be a copy on each user's machine.

2. What database is this:
H:\EnglishBiscuit\English Biscuits.mdb
It isn't the current database is it? If it is, then don't be using this code. You would just open a table, but if it is the backend then you really just need to open a table in the current database and don't try to open another connection to the backend.

Also you don't use

Dim dbsAlwaysOpen As DAO.Database

in the general declarations section. You would either use

Private dbsAlwaysOpen As DAO.Database
or
Public dbsAlwaysOpen As DAO.Database
 

Users who are viewing this thread

Back
Top Bottom