Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Sep 2003
    Location
    Houston, Texas, USA
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sharing Violation (Access 2000)

    I have a database with lots of sql tables linked. I am trying to make a new table out of a number of the sql tables with a make table query. This has worked fine for 2 months. Now I get an error message telling me that there is a 'sharing violation with the tblBillingData' - that is a local table that I want to make new with the make table query. I can close the form from which I run this, delete the table manually and start over without any problems. From the form I can run the make table repeatedly without getting the error message - after I have deleted the table manually first. Once I close the form and re-open and then try the make table query, it gives me the error. I cannot delete the table from the form, but from the database window it works. The database is not shared although it is set-up to be shared in Tools/Options.
    If I delete the table with code on opening the form it wworks fine. What I am worried about is the error message and the fact that the table may not exist when I open the form - at which point I get an error that the object does not exist, which is correct.
    I have looked in Knowledge Base and not found anything.

    Any idea why I get the error messgae and how to fix this?

    Thank you so much - all of you having helped before and thank you for any help on this issue.

    deutsch

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

    Re: Sharing Violation (Access 2000)

    "Sharing Violation" doesn't always mean what it says. The simplest way to deal with this is to do something like this is code:

    On Error Resume Next
    CurrentDb.TableDefs.Delete <tablename>

    On Error Goto <error handler>


    That deletes the table if it exists and ignores any error if it doesn't.
    Charlotte

  3. #3
    Star Lounger
    Join Date
    Sep 2003
    Location
    Houston, Texas, USA
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sharing Violation (Access 2000)

    Thank you Charlotte - that did the trick. Do you have any idea what causes that error message to pop up? I am a little worried that the database worked fine for 2 months and only started givng the message recently.

    Thanks,

    deutsch

Posting Permissions

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