Results 1 to 7 of 7
  1. #1
    New Lounger
    Join Date
    Jun 2002
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Network Down Notification (Access 2002)

    I have a typical database setup with the back end, (tables) on the server linked to the front end located on the work stations. Is there any way to notify the workstation user when the network goes down other than the normal built in warning pop up windows. For example, if a user selects an item from the menu to open a form or run a report the data required is of course located in the back end tables. Prior to opening a form or report is the a way to verify the link to the back end tables is okay and if not notify the user that the network is down at this time. Any suggestions would be appreciated. Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Network Down Notification (Access 2002)

    The following function (based on ideas from the Developer Solutions database from Microsoft) tests if a (linked) table can be opened. You could use it to issue a warning if it returns False. Note: this code uses DAO, so it needs a reference (in Tools/References.. . in the Visual Basic Editor) to the Microsoft DAO ... Object Library.

    <img src=/w3timages/blueline.gif width=33% height=2>

    Function AttemptOpen(TableName As String) As Boolean
    ' Returns True if (linked) table can be opened, False otherwise.
    Dim rst As DAO.Recordset
    On Error Resume Next
    ' Try to open table as recordset
    Set rst = CurrentDb.OpenRecordset(TableName)
    ' If there was no error, return True.
    AttemptOpen = (Err = 0)
    ' Clean up
    rst.Close
    Set rst = Nothing
    End Function

    <img src=/w3timages/blueline.gif width=33% height=2>

    Example of use:

    If AttemptOpen("tblData") Then
    DoCmd.OpenReport "rptData", acViewPreview
    Else
    MsgBox "The tblData table is not available"
    End If

    <img src=/w3timages/blueline.gif width=33% height=2>

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Network Down Notification (Access 2002)

    Unless 2002 is a LOT different from earlier versions, you're going to get that popup before you have a chance to do anything yourself. A flaky network is pretty much guaranteed to crash Access.
    Charlotte

  4. #4
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Network Down Notification (Access 2002)

    And probably cause corruption in your BE.
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  5. #5
    New Lounger
    Join Date
    Jun 2002
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Network Down Notification (Access 2002)

    Bryan..............Do you have any experience on what kind of corruptions to the BE could occur?

    Thanks
    Sam B

  6. #6
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Network Down Notification (Access 2002)

    Sorry for the delayed reply Sam.

    No I don't have first hand experience. But from what I can gather from the folks that have experienced corruption, it could be anywhere from a single field in a single record, all the way up to the BE not being able to be opened at all even after Compacting and repairing and using JetComp on it.
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  7. #7
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Network Down Notification (Access 2002)

    Usually it's a few records in a single table that bite the dust, but it depends on what was actually occurring when the network connection was lost. If there was no data entry going on and you weren't in there making design changes, then the chances are good that there won't be any corruption. If data was being written, you're likely to have a corrupted record or two. If you were saving a design change, you could wind up with some corrupted objects. In an extreme case, the whole database could be toast. In that case, you might find some relief here. I haven't actually tried the AccessFix product because I haven't had a corrupted database in years. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •