Problem While MS Access comms with OLE Server!!

JohnLee

Registered User.
Local time
Today, 00:33
Joined
Mar 8, 2007
Messages
692
Hi,

I have been re-creating a database because of another problem that I encounted which I have already posted in this forum.

The problem is two fold:

Firstly on creating a text box in my form and choosing the on lost focus event to enter in some code, the lost focus event displays the lost focus event for another field in another form, which is strange!! So on double clicking the form in the Project window and then selecting my required text box object, entering my code and then saving it, in the properties view the On Lost Focus property does not display the "[Event Procedure]" indicator!!

So on going back into the On Lost Focus property it again jumps to the On Lost Focus event of another form field object!! I then do as I did above and the code that I had written is present in the correct event of the field object I want, but again it still does not show up in the properties window.

I think the above may be the cause of the next problem, as I thought that maybe it might still work.

In my main form I have fields that reference my subform as follows:

=[Forms]![frmQADocumentCheck]![SubFormQualityAssuranceCheck].Form!txtGrandTotalCorrectFields

When I open up the main form the following message appears:

Microsoft Access
A problem occurred while Microsfot Access was communicating with the OLE server or ActiveX Control.

Close the OLE server and restart it outside of Microsoft Access. Then try the original operation again in Microsoft Access.

As far as I'm aware we don't have an OLE Server, so I'm a bit confused here as to what Access is telling me.

I checked all the References that I have, which are as follows:

Visual Basic For Applications
Microsoft Access 9.0 Object Library
OLE Automation
Microsoft ActiveX Data Objects 2.1 Library
Microsoft DAO 3.6 Object Library
Micorsoft Scripting Runtime

I've done a search in this forum, but haven't found anything that addresses this problem.

Any suggestions or advice would be appreciated.

John
 
I had an intermittent problem a few years ago that sounds familiar. I use a standard method of naming convention of my objects in MSAccess and I found this caused a problem every now and then.

If I have TableA Joined/Linked to TableB by a field name I tend to use the same field name in both tables. e.g. Customers and Orders could be linked by a field CustID. I use the field name in both Tables.
Now when it comes to creating say an Order Sub-Form for Customers such that when I click on a customer the subform shows only the customer orders, then linking the Child-Parent by the same name CustID normally works fine. And my SubForm and MainForm will also have the same fields and control sources set for CustID in both forms. (If this doesn't make sense let me know!)

Occassionaly Access would "get it's knickers in a twist" and I found two methods to resolve it. One was to write a query for the sub-form and reference the fields of the sub-form by a different names e.g CUST: [CustID] or CustID AS CUST. Then refer in the subform to the new CUST in both the field name and control source and therfore also the child link. Now the mainform and the subform reference the field CustID differently and my problem disappeared.

The other method was simply to change the name of the control in the subform to something other than CustID and reference that in the Child/Parent. This occasionally worked too.

I suspect your bound sub-form has an activex control that can't be referenced correctly due to your first problem. (your reference [Forms]![MAIN_form_ID]![SUB_form_ID].[Form]![Object_ID] is correct)
 
Last edited:
Hi endre,

Thanks for your response, I'll have a look at how my tables, Queries and in particular forms are set up to look for anything like you have highlighted, I'll let you know how I get on.

John
 

Users who are viewing this thread

Back
Top Bottom