Results 1 to 5 of 5

Thread: mscomm help

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2005
    Posts
    122

    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

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: mscomm help

    For the second, is your textbox set to multiline?

    Have you considered using a Listbox instead?

  3. #3
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    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.

  4. #4
    New Member
    Join Date
    Sep 2006
    Posts
    1

    Re: mscomm help

    I am having the same problem. Can anyone help?

    benglish [at] excelphoto [dot] com

    VERY much appreciated!

    -Bill

  5. #5
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    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
  •  



Click Here to Expand Forum to Full Width