Solved

MsComm32

Posted on 1997-12-13
9
752 Views
Last Modified: 2008-02-01
Did anyone know the us of mscomm32.ocx in access97.
How do i initalisize this ocx?
Dim oCom1 As ????
Set oCom1 = ????
If have the ocx-file, but there's alos a file called "comm96.hlp", fomerly shipped by Microsoft.
0
Comment
Question by:JochenKramer
  • 6
  • 3
9 Comments
 
LVL 4

Accepted Solution

by:
ozphil earned 200 total points
ID: 1962259
if you insert the ocx, you can use it without any vba initialisation.

insert/activex control and select 'microsoft communications control version 5.0'.

give the name of control a sensible name like oCom1 and you can use its properties and methods as you would any other control.
0
 
LVL 4

Expert Comment

by:ozphil
ID: 1962260
You can also refer to object without inserting ocx in a form.

To include the mscomm32.ocx library references, make sure you  viwinf any module in desing mode and do tools/references/ and check 'Micorsoft Comm Control 5.0'. if its not in the list, browse for it in c:\windows\system\mscomm.ocx.

MSComm is the name of the comms object class.


You can code like this:
Sub comms()
Dim i As Integer
Dim oCom As New MSComm
i = oCom.CommPort
Set oCom = Nothing
End Sub



0
 
LVL 4

Expert Comment

by:ozphil
ID: 1962261
If you desire further elaboration please provide a comment.
0
 

Author Comment

by:JochenKramer
ID: 1962262
Hi,
thanks for your answer, but i have still problems

i entered the your code and get error
"cannot create object from activex"

mscomm32 is registered by regsvr32
in access it is in the object-catalog and a testprogramm for listing references shows me the name of the library and the version (1.1)
Whats wrong now?
Do i need other files or dlls?

Greetings
Jochen

0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 4

Expert Comment

by:ozphil
ID: 1962263
You havent quite installed this animal's activeX and references.

I have reproduced your error by removing the activeX/references installation.

I did not register using regsvr32.

For activeX registration please do following via Access 97 module design mode:
tools/activeX controls.../Register/navigate to mscomm32.ocx and OK it. it should now register. You should then see' Microsoft Communications Control, version 5.0' in list.

For References registration please do following via Access 97 module design mode:
tools/references/browse/navigate to mscomm32.ocx and OK it.
You should then see' Microsoft Comm control 5.0' in list. If at beginning you see 'MISSING:Microsoft Comm control 5.0', uncheck it, OK it, and repeat registration.

If you follow the above two procedures the code willl work.

0
 

Author Comment

by:JochenKramer
ID: 1962264
Sorry, but it did't work.
I made a proc for testing the references like this:

Sub ShowMeAll()
Dim ref As Reference
For Each ref In References
    If ref.IsBroken = False Then
        Debug.Print "Name: ", ref.Name
        Debug.Print "Fullpath: ", ref.FullPath
        Debug.Print "Version: ", ref.Major & "." & ref.Minor
    Else
        Debug.Print "Verweis ist ungültig: ", ref.Guid    
    End If
Next ref        
End Sub
Output (last two)
Name:         Msacal20
Fullpath:     D:\WINPROGS.16\ACCESS20\ADT\MSACAL20.OCX
Version:      1.0
Name:         MSCommLib
Fullpath:     C:\WINNT\system32\mscomm32.ocx
Version:      1.1

i think the ocx is active in access, but i have still the same error message "cannot create object from activex"

What can i do now? Is there a difference between the american  and my german access version?
Thank you for your help
Jochen
0
 
LVL 4

Expert Comment

by:ozphil
ID: 1962265
Is the activeX installed also via tools/activeX controls.

the error message can appear if supporting dlls are incorrect.

this type of error is a real pain.

By the way  im running win95.
0
 

Author Comment

by:JochenKramer
ID: 1962266
It's also installed by tools/activeX Controls
Im running win95 too with same problems.
Which dlls i need too, i think i have only mscomm32.ocx
0
 
LVL 4

Expert Comment

by:ozphil
ID: 1962267
who knows.

i found this file mscomm32.dep in system directory, look at contents below and see if you can work out what your country dependency is and whats missing. good luck.

contents of mscomm32.dep:
--------------------------------------------

; Dependency file for setup wizards.

[Version]
Version=5.0.37.14

; Dependencies for MSComm32.ocx

; Default Dependencies ----------------------------------------------

[MSComm32.ocx]
Dest=$(WinSysPath)
Register=$(DLLSelfRegister)
Version=5.0.37.14
Uses1=ComCat.dll
Uses2=
CABFileName=MSComm32.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb5
CABINFFile=MSComm32.inf

[ComCat.dll]
Dest=$(WinSysPathSysFile)
Register=$(DLLSelfRegister)
Uses1=

; Localized Dependencies --------------------------------------------

; ** German (DE) ***
; (0007 = German)
;
[MSComm32.ocx <0007>]
Uses1=MSComDE.dll
Uses2=

[MSComDE.dll <0007>]
Uses1=
CABFileName=MSComDE.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb5
CABINFFile=MSComDE.inf

; ** French (FR) ***
; (000C = French)
;
[MSComm32.ocx <000C>]
Uses1=MSComFR.dll
Uses2=

[MSComFR.dll <000C>]
Uses1=
CABFileName=MSComFR.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb5
CABINFFile=MSComFR.inf

; ** Italian (IT) ***
; (0010 = Italian)
;
[MSComm32.ocx <0010>]
Uses1=MSComIT.dll
Uses2=

[MSComIT.dll <0010>]
Uses1=
CABFileName=MSComIT.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb5
CABINFFile=MSComIT.inf

; ** Spanish (ES) ***
; (000A = Spanish)
;
[MSComm32.ocx <000A>]
Uses1=MSComES.dll
Uses2=

[MSComES.dll <000A>]
Uses1=
CABFileName=MSComES.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb5
CABINFFile=MSComES.inf

; ** Japanese (JP) ***
; (0011 = Japanese)
;
[MSComm32.ocx <0011>]
Uses1=MSComJP.dll
Uses2=

[MSComJP.dll <0011>]
Uses1=
CABFileName=MSComJP.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb5
CABINFFile=MSComJP.inf

; ** Korean (KO) ***
; (0012 = Korean)
;
[MSComm32.ocx <0012>]
Uses1=MSComKO.dll
Uses2=

[MSComKO.dll <0012>]
Uses1=
CABFileName=MSComKO.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb5
CABINFFile=MSComKO.inf

; ** Chinese Traditional (CHT) ***
; (0404 = Chinese Traditional)
;
[MSComm32.ocx <0404>]
Uses1=MSComCHT.dll
Uses2=

[MSComCHT.dll <0404>]
Uses1=
CABFileName=MSComCHT.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb5
CABINFFile=MSComCHT.inf

; ** Chinese Simplified (CHS) ***
; (0804 = Chinese Simplified)
;
[MSComm32.ocx <0804>]
Uses1=MSComCHS.dll
Uses2=

[MSComCHS.dll <0804>]
Uses1=
CABFileName=MSComCHS.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb5
CABINFFile=MSComCHS.inf
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now