Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 11th, 2004, 11:35 AM
Authorized User
 
Join Date: Jan 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default references or ActiveX or OLE problem???

I have different forms (running various VBA codes) for a student database. The whole thing worked just fine till I moved it to a secretary's computer! Then, I started to have the following message:

The expression On Open you entered as the event property setting produced the following error: A problem occured while Microsoft Access was communicating with the OLE server or ActiveX Control...

The strange thing is that I have reinstalled everything on the secr.'s computer, made everything the same on windows, used the same directory names, checked all the REFERENCES (so it is not a broken reference thing), but I still get the same message. :(. I went beyond, and deleted all the code relating to OnOpen in my forms. Guess what? I still have the same message! Any ideas will be appreciated.
 
Old January 12th, 2004, 04:42 AM
Authorized User
 
Join Date: Jul 2003
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Does the program compile cleanly?

Cheers Ray
 
Old January 12th, 2004, 02:28 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Something similar happened to a co-worker where he also was getting an ActiveX error message. After many failed attempts to register DLLs and reinstall Office XP, the IT guy said the Windows registry was corrupt. Rather than try and isolate what exactly in the registry was bad, he literally reinstalled Windows 2000 and Office XP from scratch. That eliminated the problem.

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
 
Old January 13th, 2004, 01:05 PM
Authorized User
 
Join Date: Jan 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Ray and SerranoG,

Thanks for your replies! I was really happy to receive replies to my problem.

1. Ray, the code compiles cleanly unfortunately!
2. SerranoG, I have copied the database(s) into the same folders in my new notebook (in which everything was totally clean), with no effective results. (I'm happy to hear that your collegue has solved his problem though)

More questions:
1. Is there anyway that I can actually embed the references into the mdb file, sort of create an installation file, to eliminate these kind of problems?
2. To what extent might the regional setting play a role in the program? (you know, "," instead of ";" etc. especially in textboxes with formulae like =[No] & "-" & [name] & " " & [surname] or

=IIf(DCount([gender];"TgenelQ";"[gender]=1 and [class]=[prclass4] and [dept]=[prdept]")=0;"";DCount([gender];"TgenelQ";"[gender]=1 and [class]=[prclass4] and [dept]=[prdept]"))

Thanks for your time and concern! I do appreciate it.
 
Old January 13th, 2004, 04:40 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Quote:
quote:Originally posted by merguvan
2. To what extent might the regional setting play a role in the program? (you know, "," instead of ";" etc.
If they do play a role in error messages, I don't think you'd be getting one about ActiveX. You'd be getting a syntax error of some kind, wouldn't you?

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
 
Old January 14th, 2004, 12:23 PM
Authorized User
 
Join Date: Jan 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the thought, yeah, you're right, but one of the forms that gives this message has no ActiveX controls in it! Do you think there is a sort of debris remaining from an ActiveX control which was deleted later on? By the way, the following is the code I wrote for form_open: (I learned Basic on ZX Spectrum, and didn't add much to it in the following years, so the code might seem a bit amateur

Private Sub Form_Open(Cancel As Integer)
    Dim Talebe As Database
    Dim eklenenler As Recordset
    Dim silinenler As Recordset
    Dim veri As Recordset
    Dim f, silno, say

    Set Talebe = CurrentDb

    Set veri = Talebe.OpenRecordset("TdigerT", dbOpenDynaset)
    Set silinenler = Talebe.OpenRecordset("Zsilinenler", dbOpenDynaset)

    say = silinenler.RecordCount
    If say = 0 Then GoTo devam1
    silinenler.MoveLast
    say = silinenler.RecordCount
    If say = 0 Then GoTo devam1

    With silinenler
    .MoveFirst
    For f = 1 To say
        silno = Trim(Str(!No))
            veri.FindFirst "[No] = " & silno
            veri.Delete
        silinenler.MoveNext
    Next f
    End With
devam1:
    silinenler.Close
    If say <> 0 Then veri.MoveLast

    Set eklenenler = Talebe.OpenRecordset("Zeklenenler")
    say = eklenenler.RecordCount
    If say = 0 Then GoTo devam2
    eklenenler.MoveLast
    say = eklenenler.RecordCount
    If say = 0 Then GoTo devam2

    With eklenenler
    .MoveFirst
    For f = 1 To say
        silno = eklenenler!No
        veri.AddNew
        veri!No = silno
        veri.Update
        .MoveNext
    Next f
    End With
devam2:
    eklenenler.Close

    veri.Close
    Talebe.Close
    Me.Requery

    DoCmd.Maximize
End Sub

Sorry for the headache!

 
Old January 14th, 2004, 04:40 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Make sure that the correct dll is being referenced under tools, references. Do a search on the web for this. I have had that problem before.



Sal
 
Old January 15th, 2004, 02:19 PM
Authorized User
 
Join Date: Jan 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default


Hi Sal,

It's not a good thing to have problems but I'm glad you've had the same problem!

Your suggestion was a bit ambigous for me. Do you mean that different references(.dll) might be called by two different operating systems even though the reference names are the same in the references dialogbox?

If so, what kind of search on the web do you recommend?

(By the way, I remember copying my dlls into the target computer once, which proved to be useless...)

Thanks in advance!

 
Old May 19th, 2005, 02:37 AM
Registered User
 
Join Date: May 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The expression On Open you entered as the event property setting produced the following error: A problem occured while Microsoft Access was communicating with the OLE server or ActiveX Control.

The expression On Open you entered as the event property setting produced the following error: A problem occured while Microsoft Access was communicating with the OLE server or ActiveX Control

The problem has been solved by the Jerusalem computer whiz, Asaf Cohen.

The problem arose in transfering an MS Access database from a computer operating on Windows '98 to a computer running Windows XP. Office XP was used in both settings.
Upon pressing on a command button, the above error was returned.

The problem turns out to be that the new constellation does not recongize objects with foreign alphabet names on the forms. Thus the solution is to open each form and rename all the objects on that form that still have foreign alphabet names. That must include all labels, boxes, lines, etc.
The easiest way to confirm that you've indeed changed all the names is to pull down the list of objects at the top of the properties box.
The word "form" still stays in the foreign language, but that doesn't seem to bother the program from functioning properly.





 
Old May 19th, 2005, 02:38 AM
Registered User
 
Join Date: May 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The expression On Open you entered as the event property setting produced the following error: A problem occured while Microsoft Access was communicating with the OLE server or ActiveX Control

The problem has been solved by the Jerusalem computer whiz, Asaf Cohen.

The problem arose in transfering an MS Access database from a computer operating
on Windows '98 to a computer running Windows XP. Office XP was used in both
settings.
Upon pressing on a command button, the above error was returned.

The problem turns out to be that the new constellation does not recongize
objects with foreign alphabet names on the forms. Thus the solution is to
open each form and rename all the objects on that form that still have
foreign alphabet names. That must include all labels, boxes, lines, etc.
The easiest way to confirm that you've indeed changed all the names is to
pull down the list of objects at the top of the properties box.
The word "form" still stays in the foreign language, but that doesn't seem
to bother the program from functioning properly.










Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with ActiveX controls bhavna VB How-To 0 February 22nd, 2007 07:47 AM
Advantages /Disadvantages of ActiveX DLL & ActiveX priyank Beginning VB 6 6 February 19th, 2007 11:34 AM
ActiveX Problem ganapathy.sumana VB How-To 0 June 20th, 2006 06:53 AM
Problem to connect to Paradox7.X with OLE DB ozido ADO.NET 1 October 16th, 2005 11:37 PM
problem OLE server or ActiveX controler error Sjackson Access 0 May 24th, 2005 05:39 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.