General discussion

Locked

Comm port access using ACCESS 97

By dennis ·
I have a system running Windows 98 with Office 97 Professional. I am wondering if anyone has the answer on how to access com1 or com2 for use with a external bar code reader. I have a routine already written for sending data to a modem, however I need to be able to retrieve the data from the bar code reader. Any solutions? maybe even some 3rd party software?

This conversation is currently closed to new comments.

13 total posts (Page 1 of 2)   01 | 02   Next
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Comm port access using ACCESS 97

by lucik In reply to Comm port access using AC ...

I have a similar problem. For now I use VB program that read
COM port into a file and then Access read the file.
I did not find in Access VBA support for COM yet.

Sergey.

Collapse -

Comm port access using ACCESS 97

by dennis In reply to Comm port access using AC ...

The question was auto-closed by TechRepublic

Collapse -

Comm port access using ACCESS 97

by Lo In reply to Comm port access using AC ...

Hi

I didn't/haven't done this but, isn't it possible to just open a com port as an i/o device, like you would with file on C:\, \, etc? Given that, you should be able to use your modem program inside Access directly. The ... Input ... below should be Input/Output, didn't lookup syntax. Try something like:
Open "COM1:TESTFILE" For Input As #1

There is no reason this shouldn't work that I can think ofm it's just file i/o. There was a restriction in the Help for OPen that file namescan't be PRN, COM1-COM4, NUL, etc. but this isn't a file name it is a device/file name specification, same as C:\TESTFILE would be.

If for some reason, you can't use the Open statement on COMn:, you can set up the process with an external application (you can most likely launch from Access if it isn't running), read/write to a disk file from Access and let the launched program (the one you have already written) to send data from Access to the modem and data from the modem to a data that Access could read via a f

Collapse -

Comm port access using ACCESS 97

by dennis In reply to Comm port access using AC ...

The question was auto-closed by TechRepublic

Collapse -

Comm port access using ACCESS 97

by MikeDale In reply to Comm port access using AC ...

Try Answer 2, Recently I wrote a VB program where I needed to Read and Write data directly to the parallel port. I was able to write to the Parallel port using the follow. Open "lpt1:" for output as #filenumber

You shoulb be able to Open the Com port in VBA using Open "Com1:" for input as #filenumber

Like Answer 2 I have not tryed this in Access (VBA).
If this does not work I got and I/O dll free from the following web site, http://www.lvr.com/parport.htm
The Code supplied is to read and write to the parallel port but could be easily adapted to work on a serial port in, VBA sample code comes with the dll. Also I recall seeing some referances on this web site to direct accessing the com port, have a look. Note if you direct access a port in VB or VBA it will not run on WinNT or WIN 2000

Hope this helps

Ragards

Mike Dale

Collapse -

Comm port access using ACCESS 97

by dennis In reply to Comm port access using AC ...

The question was auto-closed by TechRepublic

Collapse -

Comm port access using ACCESS 97

by Bacon78 In reply to Comm port access using AC ...

There are Third Party Controls out there For you to use but its realy not worth it unless they are specialized for that Bar code Reader.

Microsoft supplies a Com32 Control.

If don't have it you can Down load it from there web site.

I used this to interact with A piano Labe Control Built by Technics.

Take a look at the control. Setup the control to the correct com port and read in data from the port through the buffer and see what the scanner is sending and go from there.

Hope this helps.

If you need any more help send me and email at bmennenga@micropace.com

Collapse -

Comm port access using ACCESS 97

by dennis In reply to Comm port access using AC ...

The question was auto-closed by TechRepublic

Collapse -

Comm port access using ACCESS 97

by Gicu Artistu' In reply to Comm port access using AC ...

VBA is the Office VB. Traditionally this subset doesn't have any I/O power. The beauty is that you can use some of Win32 API. Try MSDN to find your right API call then make a Dim function like this:
Private Declare Function SendMessage _
Lib "user32" Alias "SendMessageA" _
(ByVal hwnd As Long, ByVal wMsg _
As Long, ByVal wParam As Long, _
lParam As Any) As Long
luck...

Collapse -

Comm port access using ACCESS 97

by dennis In reply to Comm port access using AC ...

The question was auto-closed by TechRepublic

Back to Web Development Forum
13 total posts (Page 1 of 2)   01 | 02   Next

Related Discussions

Related Forums