Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Location
    Europe
    Posts
    369

    Question Unanswered: avoid/hide a specific error message revealing the share name

    I have linked some tables directly to a share on another machine, which is supposed to be left on at all times. When it is off, however, I want the error message that appears on the machine trying to access that database to both suggest that the other machine is turned ON, but also to avoid having Access' standard message for that error revealing the name of the share (the full name is included in the standard error message). Which error is this, how can I "trap"/change it?

  2. #2
    Join Date
    Feb 2004
    Posts
    37
    Hi,

    Can you trap using on error?
    on error goto err_test
    {your code}

    exit_test:
    exit function

    err_test:
    'Display/don't display depending on your need - if you want to
    'display anything then have message box here
    err.clear
    resume next


    or, if that doess not trap it, you can turn off access's error checking using
    DoCmd.SetWarnings False
    but make sure you remember to turn it back on again.

    Brian.

  3. #3
    Join Date
    Oct 2001
    Location
    Chicago
    Posts
    440
    Error is most likely 3044
    Use the Form_Error event if the form is throwing the first error.
    You probably want to close the application vs the form as I have done and add a better message - but this should get you started.


    Private Sub Form_Error(DataErr As Integer, Response As Integer)

    If DataErr = 3044 Then GoTo Process_Err

    Process_Err:
    MsgBox "Table Not Connected"
    Response = 0
    DoCmd.Close
    Exit Sub
    End Sub


    Matt

Posting Permissions

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