|
-
Feb 27th, 2006, 09:48 AM
#1
Thread Starter
Lively Member
mscomm help
Hi all ,
I'm trying to read barcode information through MScomm using barcode scanner. Here is the code i'm working with
if mscomm1.inBuffercount >0 then
Text1.txt = text1.txt & mscomm1.input
end if
The question i have is, if i scan a 8 digit barcode it displays the information in the text box . But if i scan 10 digit barcode it still diplays first 8 digits and skips the remaining, the same for even 12 digit. Though my input len properties in mscomm is equal to zero. The question is how can i make it to show me all the characters it scanned and the other question is when i scan two barcodes one after the other , its adding the second barcode info to the first, rather than showing me as two separete barcode data. I also tried it as text1.txt = mscomm1.input but didnt help.
Need ur inputs..... thanks
-
Feb 27th, 2006, 09:52 AM
#2
Re: mscomm help
For the second, is your textbox set to multiline?
Have you considered using a Listbox instead?
-
Mar 16th, 2006, 10:25 AM
#3
Re: mscomm help
For the first, use Hyperterminal to see if the scanner is giving you all 10 or 12 digits. You can't read what you're not given. (Eliminate all posibilities, and the one you're left with is the one causing the problem.)
For the second, each barcode should end with either (depending on the manufacturer of the scanner) vbCR or vbNewLine. If you find a vbCR in the text, see if the next character is vbLF. If it is, throw it away (you've already thrown the vbCR away). The next character is the start of the next barcode.
-
Sep 6th, 2006, 04:15 PM
#4
New Member
Re: mscomm help
I am having the same problem. Can anyone help?
benglish [at] excelphoto [dot] com
VERY much appreciated!
-Bill
-
Sep 6th, 2006, 05:17 PM
#5
Re: mscomm help
What problem? What are you doing and what's happening?
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|