Visual Basic problem

mlamont

Registered User.
Local time
Today, 09:59
Joined
Jun 25, 2001
Messages
45
On my computer there appears to be a major Visual basic problem, on all of my Access databases I get the following error message whenever I click on any button on my forms:

"Error Accessing File. Network connection may have been lost."

I am not on a network and the problem just appeared after I tried to use the Active X calendar on one of my databases but I get the error on all of my databases, even the ones that don't use the Calendar function.

I have run a detect and repair for Access but the problem persists. Is there anyway of re-installing the VB part of the program?

Any help would be appreciated.

Mike
 
It's a long shot but something may have messed up your references. Open any code module to check them.
 
Ahhhh - the good ol 'error accessing network

I had this problem a few months back and contacted Microsoft Support(Canada) - they said that they really didnt have a fix for this - only one other person had contacted them prior to me about this error.

This is thier response (and it works)
TECHNICAL ANALYSIS
====================
The error occurs because the number of TableIDs that can be accessed is exceeded.

COMPLETED ACTIONS TAKEN AND RESULTS:
====================
1.We reviewed the design of the forms. They are complex involving tab controls, subforms, and combo boxes.

2.I searched and did not find an article based on the exact error message, however, I did find a previous case that was similar involving complex forms with a tab control and multiple subforms on the tab control. The forms were redesigned in a way so that the subforms were split across multiple forms, thereby reducing the complexity and number of TableIDs required
for each form. This resolved the issue.

3.We know that one solution would be to break down the subforms so that they are not quite as complex.

4.I wanted to further research the error message for more information on the causes and possible solutions.


NEXT STEPS AND TIMELINE:
====================
The error message is occurring because too many Table IDs are being accessed at the same time. Microsoft Access will allow you to have 255 Table IDs open at the same time. TableIDs are used for the following:

- Tables
- Queries
- Bound forms and reports
- Combo boxes and list boxes whose row source is a table or query
- Data Access Objects (DAO) recordsets in code

There is not any way to get an accurate count of how many you have opened. Combo-boxes, list boxes, complex queries, code, numerous tables, system tables, etc. all contribute to the maximum number of TableID's. For each of these objects, there may be more than one TableID created, so there is really no way of determining the number used. For instance if you run a query based upon five tables you will have five TableIDs open. If you open five forms based upon the same query you will have 25 table IDs. If the forms have combo boxes and list boxes, Dlookup statements, etc., you can see how you would eventually get to the error by exceeding the amount of TableIDs that can be accessed, but it would take a lot of objects which are tied to a lot of tables or queries to reproduce the error.

A TableID is a recordset pointer that the database engine uses, and which is not exposed to the user. The Jet database engine may open multiple TableIDs during the execution of a single query; however, there is no accurate method to estimate the number of TableIDs that the Jet database engine will use for any given operation.

Most of the time however, the error occurs because of code which does not close open recordsets or open databases. You must close the any recordset objects or databases that are opened in your code. You also need to make sure that any transactions and workspaces are closed if you are using transactions.
 
What is the best way to fix this problem when you get this error message?

I did not think that my database was so complex.

Do linked databases also count towards this limit??
 

Users who are viewing this thread

Back
Top Bottom