Looking for Example using API for COM-Port in Access 97 
Author Message
 Looking for Example using API for COM-Port in Access 97

Im looking for an example to use the COM-Port in
Access 97. I need to communicate for data-exchange with
a micro-controller via the serial port with send and
receive, Please, who can help me with an example
module.

Thanks

michael foth



Tue, 19 Sep 2000 03:00:00 GMT  
 Looking for Example using API for COM-Port in Access 97

Hi,

One of the easiest way is to use MSComm.OCX. It's packaged with VB, no
Access and even if it is not officially accredited to work with Access, my
experience show that it is working reasonably well.

An example, from VB doc:

Comm1.CommPort = 1 ' First serial port
Comm1.Settings = "9600,N,8,1"
Comm1.InputLen = 0 ' read the entire buffer when Input is used
Comm1.PortOpen = True
Comm1.Output = "AT" & Chr$(13)  '  or what you wish to send
Do
    DoEvents
Loop Until Comm1.InBufferCount >=  2  ' wait until the message is completed,
here OK,
                        ' can check, instead, for the presence of a
character, ....
InStr$=Comm1.Input
Comm1.PortOpen = False ' If you don't close it, will stay open as long as
Access is alive.

Hope it may help,
Vanderghast, Access MVP.

Quote:

>Im looking for an example to use the COM-Port in
>Access 97. I need to communicate for data-exchange with
>a micro-controller via the serial port with send and
>receive, Please, who can help me with an example
>module.

>Thanks

>michael foth



Fri, 22 Sep 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. COM Ports and Access 97

2. Stream input from COM port using MS COMM control: example requested

3. CreateFile,ReadFile,WriteFile using COM ports and API

4. Help Using code in www.mvps.org API CALL to hide Access 97

5. COM port access from VBA via the Win32 API - error code 87

6. Accessing COM Ports using win32API calls

7. communicating with com port using Access

8. Accessing COM Ports using win32API calls

9. Printing docs thru Word 97 using VB/DDE - an example

10. Need VB Example: RDO ActiveX used from Excel 97

11. Sending text to Word 97 from Access 97 using OLE automation

 

 
Powered by phpBB® Forum Software