473,473 Members | 2,178 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

MSComm and datas receive

I have little problem when I get the data(bar code) from Com-port to
access 97. These looks like below: Why does a code will be sometime in
two recordfiel boxs??

http://students.oamk.fi/~rajata01/example.JPG

This is the code what is in VBA.

Private Sub MSComm2_OnComm()

Dim buffer As String
Dim T1 As Single

buffer = MSComm2.CommEvent
T1 = Timer

Do Until buffer = 2
If Timer - T1 3 Then Exit Sub
Loop
Call AddScanRecords

End Sub

Sub AddScanRecords()

Dim db As Database, rs As DAO.Recordset
Dim StartTime As Date

StartTime = Now()

Set db = CurrentDb
Set rs = db.OpenRecordset("kone1")

rs.AddNew
rs![BarCode] = MSComm2.Input
rs![ScanDate] = Now()
rs.Update

rs.Close
db.Close
End Sub

How I can do the buffer like
this...http://msdn.microsoft.com/library/de...vbobjcommx.asp

Can I do a buffer as receive data packet and CRLF. I am not sure what
is right way..

Example

Data Packet Separator #1 is defined as CR (0DH) and Data Packet
Separator #2 is defined as LF (0AH).

Both separators will be sent together.

.... <DATA PACKET #1<CRLF<DATA PACKET #2<CRLFetc

Jul 21 '06 #1
0 3270

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Peter Krikelis | last post by:
Hi, I am trying to develope a User Control Library that features MScomm control. I test my user control in a test application. When I run the application I receive the following: An...
0
by: André Betz | last post by:
Hi, I've established a TCP-Socket Connection and now I want to receive datas. So I called BeginReceive where I set the receiving buffer and length. Now in the asynchronous CallBack-Function I...
1
by: caid | last post by:
Hi there. I'm writing a C# app (in VS.NET 2003) that sends a binary sms using MSComm. I got it going with a gsm modem, but ideally we want to use a cellphone as the sending device. However, when...
9
by: Carl Gilbert | last post by:
Hi I'm trying to open a vb6 project in vb.net which uses the mscomm component. When running the vb upgrade wizard in vb.net, an error is raised: Upgrade failed, unable to load reerenced...
1
by: Recep TARAKÇI | last post by:
hi everbody i am using visual basic 2005. i am write a modem control program and get callerID value. i am send a AT command to modem. Dim mscomm1 As New MSCommLib.MSComm mscomm1.CommPort...
0
by: Korpisoturi | last post by:
Hi, I have to save the datas from virtual COM-ports. I have win98 and Access97. I haven't any VB versions. Can I collect the datas from ports using MSComm-componen in Access97? I need some codes...
0
by: fabianuat | last post by:
Hello Im using the MSComm to send and receive binary data to a video server, the sending part works fine, but when a receive more than 8 byets, the input variable only keeps the bytes over the...
0
by: philipmact | last post by:
Dear ALL: i'm currently facing one problem, the problem is how can i receive my tag ID from the RFIDreader to the MSCOMM? can anyone give me some idea? My idea are shown as below~...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.